Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/resize_lfs missed one
details: https://anonhg.NetBSD.org/src/rev/1a691f6e4162
branches: trunk
changeset: 328011:1a691f6e4162
user: dholland <dholland%NetBSD.org@localhost>
date: Sun Mar 23 05:38:14 2014 +0000
description:
missed one
diffstat:
sbin/resize_lfs/resize_lfs.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r 0c37759225f4 -r 1a691f6e4162 sbin/resize_lfs/resize_lfs.c
--- a/sbin/resize_lfs/resize_lfs.c Sun Mar 23 05:36:58 2014 +0000
+++ b/sbin/resize_lfs/resize_lfs.c Sun Mar 23 05:38:14 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: resize_lfs.c,v 1.8 2014/03/23 05:26:23 dholland Exp $ */
+/* $NetBSD: resize_lfs.c,v 1.9 2014/03/23 05:38:14 dholland Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -146,13 +146,14 @@
* (XXX make the kernel able to do this instead?)
*/
for (i = fs->lfs_nseg - 1; i >= newnsegs; --i) {
- char cmd[80];
+ char cmd[128];
/* If it's already empty, don't call the cleaner */
if (fcntl(rootfd, LFCNINVAL, &i) == 0)
continue;
- sprintf(cmd, "/libexec/lfs_cleanerd -q -i %d %s", i, fsname);
+ snprintf(cmd, sizeof(cmd), "/libexec/lfs_cleanerd -q -i %d %s",
+ i, fsname);
if (system(cmd) != 0)
err(1, "invalidating segment %d", i);
}
Home |
Main Index |
Thread Index |
Old Index