namei: align missing files with rest of the print out
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 namei: align missing files with rest of the print out
This change should make namei output more readable when multiple arguments are supplied.
The old:
$ namei -l /usr/foo f: /usr/foo drwxr-xr-x root root / drwxr-xr-x root root usr foo - No such file or directory
The new:
$ namei -l /usr/foo
f: /usr/foo
drwxr-xr-x root root /
drwxr-xr-x root root usr
foo - No such file or directorySigned-off-by Sami Kerola <[email protected]>
--- misc-utils/namei.c | 9 +++++++++ tests/expected/namei/logic | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-)
misc-utils/namei.c +9 -0
@@ -367,6 +367,15 @@ print_namei(struct namei *nm, char *path)char md[11 ];if (nm->noent) { +int blanks =1 ; +if (flags &NAMEI_MODES ) + blanks +=9 ; +if (flags &NAMEI_OWNERS ) + blanks += uwidth + gwidth +2 ; +if (!(flags &NAMEI_VERTICAL )) + blanks +=1 ; + blanks += nm->level *2 ; +printf ("%*s " , blanks,"" );printf (_ ("%s - No such file or directory\n" ), nm->name);return -1 ; }
tests/expected/namei/logic +1 -1
@@ -10,4 +10,4 @@ f: namei1/namei2/a/b d namei1 d namei2 - a -b - No such file or directory + b - No such file or directory
Signature · 1 line
1.8.4.2
Quoted 3 lines · Sami Kerola
misc-utils/namei.c | 9 +++++++++ tests/expected/namei/logic | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-)
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Re: [PATCH 1/2] losetup, agetty: remove unnecessary if's before free()
In reply to a message not in the archiveQuoted 3 lines · Sami Kerola
sys-utils/losetup.c | 6 ++---- term-utils/agetty.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-)
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com