summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--src/stat.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index eb954047b..7ef2f5476 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,9 @@ GNU coreutils NEWS -*- outline -*-
split --number=C /dev/null no longer appears to infloop on GNU/Hurd
[bug introduced in coreutils-8.8]
+ stat no longer reports a negative file size as a huge positive number.
+ [bug present since 'stat' was introduced in fileutils-4.1.9]
+
** New features
fmt now accepts the --goal=WIDTH (-g) option.
diff --git a/src/stat.c b/src/stat.c
index b2e103084..d001cdaa2 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -954,7 +954,7 @@ print_stat (char *pformat, size_t prefix_len, unsigned int m,
out_uint_x (pformat, prefix_len, minor (statbuf->st_rdev));
break;
case 's':
- out_uint (pformat, prefix_len, statbuf->st_size);
+ out_int (pformat, prefix_len, statbuf->st_size);
break;
case 'B':
out_uint (pformat, prefix_len, ST_NBLOCKSIZE);