Skip to content

Conversation

@ryukinix
Copy link
Member

@ryukinix ryukinix commented Mar 8, 2016

I added some common treatment at GNU implementation of ln.

The command in that moment works that way:

SYNOPSIS:
       ln [OPTIONS]... [-T] TARGET LINK_NAME   (1st form) (posix)
       ln [OPTIONS]... TARGET                  (2nd form) (gnu)
       ln [OPTIONS]... TARGET... DIRECTORY     (3rd form) (posix)
       ln [OPTIONS]... -t DIRECTORY TARGET...  (4th form) (gnu)

OPTIONS:
    -t [string] receive a directory to put the links (gnu)
    -i interactive mode to ask for overwrite (gnu)
    -f force the last flag and don't ask about overwrite (posix)
    -s create symbolic links instead hard links (gnu)
    -v verbose mode to print each link created (gnu)
    -T treat LINK_NAME operand as a normal file always (gnu)
    -r create symbolic links relative to link location (gnu)
    -P make hard links directly to symbolic links (posix)
    -L dereference TARGETs that are symbolic links (posix)

TESTS:

  • We have 6 tests on table driven tests.
  • The tests covers the four usages, at example:
$ ln TARGET LINK_NAME
$ ln -f TARGET
$ ln -s TARGET1 TARGET2... folder/
$ ln -t folder/ TARGET1 TARGET2 TARGET3...
$ ln -s -r -t folder/ TARGET1 TARGET2 TARGET3...

But need tests yet flags like -P, -L, -i, -T.

I added some common treatment at GNU implementation of ln.

The command in that moment works that way:

SYNOPSIS:
       ln [OPTIONS]... [-T] TARGET LINK_NAME   (1st form) (posix)
       ln [OPTIONS]... TARGET                  (2nd form) (gnu)
       ln [OPTIONS]... TARGET... DIRECTORY     (3rd form) (posix)
       ln [OPTIONS]... -t DIRECTORY TARGET...  (4th form) (gnu)

OPTIONS:
	-t [string] receive a directory to put the links (gnu)
	-i interactive mode to ask for overwrite (gnu)
	-f force the last flag and don't ask about overwrite (posix)
	-s create symbolic links instead hard links (gnu)
	-v verbose mode to print each link created (gnu)
	-T treat LINK_NAME operand as a normal file always (gnu)
	-r create symbolic links relative to link location (gnu)
	-P make hard links directly to symbolic links (posix)
	-L dereference TARGETs that are symbolic links (posix)

TESTS:
We have 6 tests on table driven tests.
The tests covers the four usages, at example:

$ ln TARGET LINK_NAME
$ ln -f TARGET
$ ln -s TARGET1 TARGET2... folder/
$ ln -t folder/ TARGET1 TARGET2 TARGET3...
$ ln -s -r -t folder/ TARGET1 TARGET2 TARGET3...

But need tests yet flags like -P, -L, -i, -T.

Change-Id: I85bd59474a2563ab102a154289d2d555bd77b098
Signed-off-by: Manoel Vilela <manoel_vilela@engineer.com>
@rminnich
Copy link
Member

rminnich commented Mar 8, 2016

lgtm

lower case is not OK :-)

@rminnich
Copy link
Member

rminnich commented Mar 8, 2016

LGTM

Approved with PullApprove

rminnich added a commit that referenced this pull request Mar 8, 2016
Add command ln full POSIX compliant + tests
@rminnich rminnich merged commit 9912925 into u-root:master Mar 8, 2016
@dancrossnyc dancrossnyc mentioned this pull request Feb 26, 2018
hugelgupf pushed a commit to hugelgupf/u-root that referenced this pull request Jun 5, 2019
Implemented a simple VPD library, using the sysfs interface at /sys/firmware/vpd . See https://chromium.googlesource.com/chromiumos/platform/vpd/ for details.

There are three methods, Get, Set, and GetAll. Unfortunately Set doesn't currently work, because the sysfs interface does not support writing. To write, this library needs a backend able to write to flash chips, like the command line tool flashrom[1] or flashtools[2].

[1] https://www.flashrom.org
[2] https://github.com/osresearch/flashtools
rminnich added a commit to rminnich/u-root that referenced this pull request Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants