Mercurial > hg > toybox
comparison toys/other/stat.c @ 1045:00e816559b1f draft
Don't pad stat's %a field.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 04 Sep 2013 19:09:00 -0500 |
parents | eea4c1b35959 |
children | 8ce8c5365f8b |
comparison
equal
deleted
inserted
replaced
1044:e62df9eb3661 | 1045:00e816559b1f |
---|---|
60 | 60 |
61 static void print_stat(char type) | 61 static void print_stat(char type) |
62 { | 62 { |
63 struct stat *stat = (struct stat *)&TT.stat; | 63 struct stat *stat = (struct stat *)&TT.stat; |
64 | 64 |
65 if (type == 'a') xprintf("%04lo", stat->st_mode & ~S_IFMT); | 65 if (type == 'a') xprintf("%lo", stat->st_mode & ~S_IFMT); |
66 else if (type == 'A') { | 66 else if (type == 'A') { |
67 char str[11]; | 67 char str[11]; |
68 | 68 |
69 mode_to_string(stat->st_mode, str); | 69 mode_to_string(stat->st_mode, str); |
70 xprintf("%s", str); | 70 xprintf("%s", str); |