Displaying 11 results from an estimated 11 matches for "do_wipefs".
2012 Feb 16
1
[PATCH] mkfs: wipefs before we mkfs
...5 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize,
ADD_ARG (argv, i, device);
ADD_ARG (argv, i, NULL);
+ /* we wipe the filesystem signatures from device before do mkfs,
+ * since we can't trust mkfs can remove the filesystem signature absolutely.
+ */
+ if (do_wipefs (device)) {
+ reply_with_error ("%s: %s: %s", fstype, device, err);
+ free (err);
+ return -1;
+ }
+
r = commandv (NULL, &err, argv);
if (r == -1) {
reply_with_error ("%s: %s: %s", fstype, device, err);
--
1.7.9
2014 Jan 19
2
mke2fs fails due to wipefs --force
My wipefs has no --force option, as a result mke2fs command in guestfish fails.
Looks like 72dd398679cd0bb803daf306d12558369615ba70 needs an adjustment
to make use of do_wipefs?
Also str_wipefs is not used in that file.
Olaf
2014 Jan 19
0
Re: mke2fs fails due to wipefs --force
On Sun, Jan 19, 2014 at 07:42:58PM +0100, Olaf Hering wrote:
> My wipefs has no --force option, as a result mke2fs command in guestfish fails.
>
> Looks like 72dd398679cd0bb803daf306d12558369615ba70 needs an adjustment
> to make use of do_wipefs?
> Also str_wipefs is not used in that file.
Also daemon/zero.c has a wipefs_has_force_option function. It seems
like it would be better if this function was also used in
wipe_device_before_mkfs (in the same file).
But yes, it's definitely a bug if wipefs is causing mke2fs to fail.
How a...
2012 Feb 08
2
[PATCH v3 0/2] Add a new api wipefs
Hi Rich:
This is a alternative patch, if you like the api
name called wipefs ;-P
Thanks
-Wanlong Gao
Wanlong Gao (2):
NEW API: add a new api wipefs
virt-format: erase the filesystem signatures before erase partitions
TODO | 2 --
daemon/zero.c | 17 +++++++++++++++++
format/format.c | 19 ++++---------------
2012 Feb 10
3
[PATCH-v4 0/2] Add a new api wipefs
Hi Rich:
This is a latest patch. ;-P
Comments?
Thanks
-Wanlong Gao
Wanlong Gao (2):
NEW API: add a new api wipefs
virt-format: erase the filesystem signatures before erase partitions
TODO | 2 --
daemon/zero.c | 17 +++++++++++++++++
format/format.c | 19 ++++---------------
generator/generator_actions.ml | 14
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...optgroups.h"
+GUESTFSD_EXT_CMD(str_wipefs, wipefs);
+
static const char zero_buf[4096];
int
@@ -77,7 +79,7 @@ do_zero (const char *device)
int
optgroup_wipefs_available (void)
{
- return prog_exists ("wipefs");
+ return prog_exists (str_wipefs);
}
int
@@ -86,7 +88,7 @@ do_wipefs (const char *device)
int r;
char *err = NULL;
- const char *wipefs[] = {"wipefs", "-a", device, NULL};
+ const char *wipefs[] = {str_wipefs, "-a", device, NULL};
r = commandv (NULL, &err, wipefs);
if (r == -1) {
reply_with_error ("%s"...
2012 Aug 30
1
[PATCH] collect list of called external commands
...;optgroups.h"
+GUESTFS_EXT_CMD(str_wipefs, wipefs);
+
static const char zero_buf[4096];
int
@@ -77,7 +79,7 @@ do_zero (const char *device)
int
optgroup_wipefs_available (void)
{
- return prog_exists ("wipefs");
+ return prog_exists (str_wipefs);
}
int
@@ -86,7 +88,7 @@ do_wipefs (const char *device)
int r;
char *err = NULL;
- const char *wipefs[] = {"wipefs", "-a", device, NULL};
+ const char *wipefs[] = {str_wipefs, "-a", device, NULL};
r = commandv (NULL, &err, wipefs);
if (r == -1) {
reply_with_error ("%s"...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...r = NULL;
if (flag == -1) {
- r = command (&out, &err, str_wipefs, "--help", NULL);
+ r = command (&out, &err, "wipefs", "--help", NULL);
if (r == -1) {
reply_with_error ("%s", err);
return -1;
@@ -118,7 +116,7 @@ do_wipefs (const char *device)
if (force == -1)
return -1;
- ADD_ARG (argv, i, str_wipefs);
+ ADD_ARG (argv, i, "wipefs");
ADD_ARG (argv, i, "-a");
if (force)
ADD_ARG (argv, i, "--force");
@@ -379,7 +377,7 @@ wipe_device_before_mkfs (const char *device)...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...r = NULL;
if (flag == -1) {
- r = command (&out, &err, str_wipefs, "--help", NULL);
+ r = command (&out, &err, "wipefs", "--help", NULL);
if (r == -1) {
reply_with_error ("%s", err);
return -1;
@@ -118,7 +118,7 @@ do_wipefs (const char *device)
if (force == -1)
return -1;
- ADD_ARG (argv, i, str_wipefs);
+ ADD_ARG (argv, i, "wipefs");
ADD_ARG (argv, i, "-a");
if (force)
ADD_ARG (argv, i, "--force");
@@ -379,7 +379,7 @@ wipe_device_before_mkfs (const char *device)...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’