aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/ls.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-08-26 14:16:49 -0500
committerRob Landley <rob@landley.net>2018-08-26 14:16:49 -0500
commit009b55edc4bad5b46ace88f3c255bbff8671d137 (patch)
treef4f856ef871104e37a5d123aa3ec3d01246c9e10 /toys/posix/ls.c
parent1aaef2d2b72800a5c6bedae04941304ce8e153be (diff)
downloadtoybox-009b55edc4bad5b46ace88f3c255bbff8671d137.tar.gz
Convert more commands to the new option/GLOBALS code style.
Diffstat (limited to 'toys/posix/ls.c')
-rw-r--r--toys/posix/ls.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/toys/posix/ls.c b/toys/posix/ls.c
index ec8c6c0d..976b3343 100644
--- a/toys/posix/ls.c
+++ b/toys/posix/ls.c
@@ -54,11 +54,10 @@ config LS
// ls -lR starts .: then ./subdir:
GLOBALS(
- long ll;
+ long l;
char *color;
struct dirtree *files, *singledir;
-
unsigned screen_width;
int nl_title;
char *escmore;
@@ -467,7 +466,7 @@ static void listfiles(int dirfd, struct dirtree *indir)
// print time, always in --time-style=long-iso
tm = localtime(&(st->st_mtime));
strftime(tmp, sizeof(tmp), "%F %H:%M", tm);
- if (TT.ll>1) {
+ if (TT.l>1) {
char *s = tmp+strlen(tmp);
s += sprintf(s, ":%02d.%09d ", tm->tm_sec, (int)st->st_mtim.tv_nsec);
@@ -533,7 +532,7 @@ void ls_main(void)
if (toys.optflags&FLAG_full_time) {
toys.optflags |= FLAG_l;
- TT.ll = 2;
+ TT.l = 2;
}
// Do we have an implied -1