diff options
-rw-r--r-- | toys/pending/lsof.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/lsof.c b/toys/pending/lsof.c index 2852f41f..5ab3af90 100644 --- a/toys/pending/lsof.c +++ b/toys/pending/lsof.c @@ -261,7 +261,7 @@ static void fill_stat(struct file_info *fi, const char *path) case S_IFREG: strcpy(fi->type, "REG"); break; case S_IFSOCK: strcpy(fi->type, "sock"); break; default: - snprintf(fi->type, sizeof(fi->type), "0%03o", sb.st_mode & S_IFMT); + snprintf(fi->type, sizeof(fi->type), "%04o", sb.st_mode & S_IFMT); break; } |