git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8a4ce2
)
Always pass mkswap -f parameter.
author
Richard Jones
<rjones@trick.home.annexia.org>
Thu, 6 Aug 2009 17:46:57 +0000
(18:46 +0100)
committer
Richard Jones
<rjones@trick.home.annexia.org>
Thu, 6 Aug 2009 17:46:57 +0000
(18:46 +0100)
Otherwise mkswap will give a silly error if you ask it to
swap on a whole device.
daemon/swap.c
patch
|
blob
|
history
diff --git
a/daemon/swap.c
b/daemon/swap.c
index
db93e57
..
3ebdef6
100644
(file)
--- a/
daemon/swap.c
+++ b/
daemon/swap.c
@@
-34,9
+34,9
@@
mkswap (char *device, const char *flag, const char *value)
int r;
if (!flag)
- r = command (NULL, &err, "/sbin/mkswap", device, NULL);
+ r = command (NULL, &err, "/sbin/mkswap",
"-f",
device, NULL);
else
- r = command (NULL, &err, "/sbin/mkswap", flag, value, device, NULL);
+ r = command (NULL, &err, "/sbin/mkswap",
"-f",
flag, value, device, NULL);
if (r == -1) {
reply_with_error ("mkswap: %s", err);