Hi! Maria Valentina Marin: > On Thu, 30 Jul 2015 15:38:37 +0200 =?iso-8859-1?B?Suly6W15?= Bobbio > <lu...@debian.org> wrote: > > Adding a `--numeric-uid-gid` (like cpio) or `--numeric-owner` (like Tar) > > option > > would be greatly appreciated. > `- > Attached patch fixes this by introducing a new option 'lns' which works > like 'lls' but instead of working like 'ls -l' it works like 'ls -n'.
Cool! Tiny nitpick: the option might now have the best name. `unsquashfs` currently supports `-l` = `-ls` and `-ll` = `-lls`. I guess the latter is far 'long ls'. Puting the 'n' in the middle of 'ls' seems a bit confusing. > +@@ -492,7 +492,7 @@ int print_filename(char *pathname, struc > + } > + > + user = getpwuid(inode->uid); > +- if(user == NULL) { > ++ if(user == NULL || numeric_ls) { > + int res = snprintf(dummy, 12, "%d", inode->uid); > + if(res < 0) > + EXIT_UNSQUASH("snprintf failed in print_filename()\n"); Maybe the call to getpwuid() could be avoided entirely if numeric_ls is set? With the above this will look up the NSS database, and then ditch the result. This makes unecessary computations. -- Lunar .''`. lu...@debian.org : :Ⓐ : # apt-get install anarchism `. `'` `-
signature.asc
Description: Digital signature