diff options
author | Eric Andersen <andersen@codepoet.org> | 1999-11-23 21:38:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 1999-11-23 21:38:12 +0000 |
commit | 394f764e7d059e979f72ba88c31f4fa94a252ebf (patch) | |
tree | 3663c1184286a33a63f1cc88cebe4c7a79f38314 /coreutils/ls.c | |
parent | cb41c2e83b9e9997b9737d7061d53f7c11a463a8 (diff) | |
download | busybox-w32-394f764e7d059e979f72ba88c31f4fa94a252ebf.tar.gz busybox-w32-394f764e7d059e979f72ba88c31f4fa94a252ebf.tar.bz2 busybox-w32-394f764e7d059e979f72ba88c31f4fa94a252ebf.zip |
Stuf
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r-- | coreutils/ls.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index 3b380671d..571c962c7 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -193,27 +193,34 @@ static void list_single(const char *name, struct stat *info, const char *fullnam | |||
193 | fputs(" ", stdout); | 193 | fputs(" ", stdout); |
194 | #ifdef BB_FEATURE_LS_USERNAME | 194 | #ifdef BB_FEATURE_LS_USERNAME |
195 | if (!(opts & DISP_NUMERIC)) { | 195 | if (!(opts & DISP_NUMERIC)) { |
196 | scratch[8]='\0'; | 196 | scratch[0]='\0'; |
197 | my_getpwuid( scratch, info->st_uid); | 197 | my_getpwuid( scratch, info->st_uid); |
198 | scratch[8]='\0'; | ||
198 | if (*scratch) | 199 | if (*scratch) |
199 | fputs(scratch, stdout); | 200 | wr(scratch,8); |
200 | else | 201 | else { |
201 | writenum((long)info->st_uid,(short)0); | 202 | writenum((long) info->st_uid,(short)8); |
203 | fputs(" ", stdout); | ||
204 | } | ||
202 | } else | 205 | } else |
203 | #endif | 206 | #endif |
204 | writenum((long)info->st_uid,(short)0); | 207 | { |
208 | writenum((long) info->st_uid,(short)8); | ||
209 | fputs(" ", stdout); | ||
210 | } | ||
205 | tab(16); | 211 | tab(16); |
206 | #ifdef BB_FEATURE_LS_USERNAME | 212 | #ifdef BB_FEATURE_LS_USERNAME |
207 | if (!(opts & DISP_NUMERIC)) { | 213 | if (!(opts & DISP_NUMERIC)) { |
208 | scratch[8]='\0'; | 214 | scratch[0]='\0'; |
209 | my_getgrgid( scratch, info->st_gid); | 215 | my_getgrgid( scratch, info->st_gid); |
216 | scratch[8]='\0'; | ||
210 | if (*scratch) | 217 | if (*scratch) |
211 | fputs(scratch, stdout); | 218 | wr(scratch,8); |
212 | else | 219 | else |
213 | writenum((long)info->st_gid,(short)0); | 220 | writenum((long) info->st_gid,(short)8); |
214 | } else | 221 | } else |
215 | #endif | 222 | #endif |
216 | writenum((long)info->st_gid,(short)0); | 223 | writenum((long) info->st_gid,(short)8); |
217 | tab(17); | 224 | tab(17); |
218 | if (S_ISBLK(mode) || S_ISCHR(mode)) { | 225 | if (S_ISBLK(mode) || S_ISCHR(mode)) { |
219 | writenum((long)MAJOR(info->st_rdev),(short)3); | 226 | writenum((long)MAJOR(info->st_rdev),(short)3); |