search for: 4e3cfcb

Displaying 3 results from an estimated 3 matches for "4e3cfcb".

Did you mean: 4c3cfcfb
2016 Jan 06
0
[klibc:master] readlink: Add -f option
.... Signed-off-by: Ben Hutchings <ben at decadent.org.uk> Signed-off-by: H. Peter Anvin <hpa at linux.intel.com> --- usr/utils/readlink.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c index 4e3cfcb..ffb0b1f 100644 --- a/usr/utils/readlink.c +++ b/usr/utils/readlink.c @@ -7,24 +7,45 @@ const char *progname; static __noreturn usage(void) { - fprintf(stderr, "Usage: %s link...\n", progname); + fprintf(stderr, "Usage: %s [-f] link...\n", progname); exit(1); } int mai...
2014 Apr 15
0
[klibc:master] readlink: Reduce size by calling _fwrite() instead of puts()
...call _fwrite() directly, with the explicit termination set to \n instead of \0. Signed-off-by: H. Peter Anvin <hpa at linux.intel.com> --- usr/utils/readlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/utils/readlink.c b/usr/utils/readlink.c index bf9501b..4e3cfcb 100644 --- a/usr/utils/readlink.c +++ b/usr/utils/readlink.c @@ -29,8 +29,8 @@ int main(int argc, char *argv[]) perror(name); exit(1); } - link_name[rv] = '\0'; - puts(link_name); + link_name[rv] = '\n'; + _fwrite(link_name, rv+1, stdout); } return 0;
2016 Jan 06
3
[PATCH klibc 0/3] Changes to support initramfs-tools 0.117
initramfs-tools version 0.117 requires 'readlink -f' and 'mount -o defaults' to work. The first two patches were previously submitted but not applied. Ben. Ben Hutchings (3): Implement realpath() readlink: Add -f option mount: Implement -o defaults usr/include/stdlib.h | 2 ++ usr/klibc/Kbuild | 2 +- usr/klibc/realpath.c | 49