|
Lines 76-81
static int MEGABYTE_SECTORS (PedDevice*
Link Here
|
| 76 |
enum |
76 |
enum |
| 77 |
{ |
77 |
{ |
| 78 |
PRETEND_INPUT_TTY = CHAR_MAX + 1, |
78 |
PRETEND_INPUT_TTY = CHAR_MAX + 1, |
|
|
79 |
WIPESIGNATURES = CHAR_MAX + 2, |
| 79 |
}; |
80 |
}; |
| 80 |
|
81 |
|
| 81 |
enum |
82 |
enum |
|
Lines 117-122
static struct option const options[] = {
Link Here
|
| 117 |
{"script", 0, NULL, 's'}, |
118 |
{"script", 0, NULL, 's'}, |
| 118 |
{"version", 0, NULL, 'v'}, |
119 |
{"version", 0, NULL, 'v'}, |
| 119 |
{"align", required_argument, NULL, 'a'}, |
120 |
{"align", required_argument, NULL, 'a'}, |
|
|
121 |
{"wipesignatures", 0, NULL, WIPESIGNATURES}, |
| 120 |
{"-pretend-input-tty", 0, NULL, PRETEND_INPUT_TTY}, |
122 |
{"-pretend-input-tty", 0, NULL, PRETEND_INPUT_TTY}, |
| 121 |
{NULL, 0, NULL, 0} |
123 |
{NULL, 0, NULL, 0} |
| 122 |
}; |
124 |
}; |
|
Lines 128-138
static const char *const options_help []
Link Here
|
| 128 |
{"script", N_("never prompts for user intervention")}, |
130 |
{"script", N_("never prompts for user intervention")}, |
| 129 |
{"version", N_("displays the version")}, |
131 |
{"version", N_("displays the version")}, |
| 130 |
{"align=[none|cyl|min|opt]", N_("alignment for new partitions")}, |
132 |
{"align=[none|cyl|min|opt]", N_("alignment for new partitions")}, |
|
|
133 |
{"wipesignatures", N_("wipe superblock signatures when creating partition")}, |
| 131 |
{NULL, NULL} |
134 |
{NULL, NULL} |
| 132 |
}; |
135 |
}; |
| 133 |
|
136 |
|
| 134 |
int opt_script_mode = 0; |
137 |
int opt_script_mode = 0; |
| 135 |
int pretend_input_tty = 0; |
138 |
int pretend_input_tty = 0; |
|
|
139 |
int wipesignatures = 0; |
| 136 |
int opt_machine_mode = 0; |
140 |
int opt_machine_mode = 0; |
| 137 |
int disk_is_modified = 0; |
141 |
int disk_is_modified = 0; |
| 138 |
int is_toggle_mode = 0; |
142 |
int is_toggle_mode = 0; |
|
Lines 650-655
_adjust_end_if_iec (PedSector* start, Pe
Link Here
|
| 650 |
} |
654 |
} |
| 651 |
} |
655 |
} |
| 652 |
|
656 |
|
|
|
657 |
|
| 653 |
static int |
658 |
static int |
| 654 |
do_mkpart (PedDevice** dev, PedDisk** diskp) |
659 |
do_mkpart (PedDevice** dev, PedDisk** diskp) |
| 655 |
{ |
660 |
{ |
|
Lines 840-845
do_mkpart (PedDevice** dev, PedDisk** di
Link Here
|
| 840 |
if (ped_partition_is_flag_available (part, PED_PARTITION_LBA)) |
845 |
if (ped_partition_is_flag_available (part, PED_PARTITION_LBA)) |
| 841 |
ped_partition_set_flag (part, PED_PARTITION_LBA, 1); |
846 |
ped_partition_set_flag (part, PED_PARTITION_LBA, 1); |
| 842 |
|
847 |
|
|
|
848 |
if (wipesignatures) { |
| 849 |
if (!ped_device_wipe_signatures(*dev, part->geom.start, part->geom.length)) |
| 850 |
ped_exception_throw ( |
| 851 |
PED_EXCEPTION_WARNING, |
| 852 |
PED_EXCEPTION_OK, |
| 853 |
_("Wiping the superblock signatures has failed.")); |
| 854 |
} |
| 855 |
|
| 843 |
if (!ped_disk_commit (disk)) |
856 |
if (!ped_disk_commit (disk)) |
| 844 |
goto error; |
857 |
goto error; |
| 845 |
|
858 |
|
|
Lines 2196-2201
while (1)
Link Here
|
| 2196 |
case PRETEND_INPUT_TTY: |
2209 |
case PRETEND_INPUT_TTY: |
| 2197 |
pretend_input_tty = 1; |
2210 |
pretend_input_tty = 1; |
| 2198 |
break; |
2211 |
break; |
|
|
2212 |
case WIPESIGNATURES: |
| 2213 |
wipesignatures = 1; |
| 2214 |
break; |
| 2199 |
default: |
2215 |
default: |
| 2200 |
wrong = 1; |
2216 |
wrong = 1; |
| 2201 |
break; |
2217 |
break; |