From db4171d842e9bdc1c2903a9d5cfea053aceb35a2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 22 Nov 2010 21:26:53 +0100 Subject: Apply post-1.17.3 fixes, bump version to 1.17.4 Signed-off-by: Denys Vlasenko --- coreutils/ls.c | 6 +++--- coreutils/sort.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'coreutils') diff --git a/coreutils/ls.c b/coreutils/ls.c index 1197f7d71..07bb6af92 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -184,7 +184,7 @@ static const unsigned opt_flags[] = { LIST_INO, /* i */ LIST_LONG | STYLE_LONG, /* l - remember LS_DISP_HR in mask! */ LIST_SHORT | STYLE_SINGLE, /* 1 */ - 0, /* g (don't show group) - handled via OPT_g */ + 0, /* g (don't show owner) - handled via OPT_g */ LIST_ID_NUMERIC, /* n */ LIST_BLOCKS, /* s */ DISP_ROWS, /* x */ @@ -621,7 +621,7 @@ static NOINLINE unsigned list_single(const struct dnode *dn) if (all_fmt & LIST_ID_NAME) { if (option_mask32 & OPT_g) { column += printf("%-8.8s ", - get_cached_username(dn->dstat.st_uid)); + get_cached_groupname(dn->dstat.st_gid)); } else { column += printf("%-8.8s %-8.8s ", get_cached_username(dn->dstat.st_uid), @@ -631,7 +631,7 @@ static NOINLINE unsigned list_single(const struct dnode *dn) #endif if (all_fmt & LIST_ID_NUMERIC) { if (option_mask32 & OPT_g) - column += printf("%-8u ", (int) dn->dstat.st_uid); + column += printf("%-8u ", (int) dn->dstat.st_gid); else column += printf("%-8u %-8u ", (int) dn->dstat.st_uid, diff --git a/coreutils/sort.c b/coreutils/sort.c index 5c3fa1a71..237ac083c 100644 --- a/coreutils/sort.c +++ b/coreutils/sort.c @@ -412,7 +412,7 @@ int sort_main(int argc UNUSED_PARAM, char **argv) #if ENABLE_FEATURE_SORT_BIG /* Open output file _after_ we read all input ones */ if (option_mask32 & FLAG_o) - xmove_fd(xopen3(str_o, O_WRONLY, 0666), STDOUT_FILENO); + xmove_fd(xopen3(str_o, O_WRONLY|O_CREAT|O_TRUNC, 0666), STDOUT_FILENO); #endif flag = (option_mask32 & FLAG_z) ? '\0' : '\n'; for (i = 0; i < linecount; i++) -- cgit v1.2.3-55-g6feb