mirror of
git://sourceware.org/git/lvm2.git
synced 2025-09-15 13:44:18 +03:00
cleanup: use string constant with '_'
This commit is contained in:
@@ -460,9 +460,9 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
|
|||||||
uint32_t types_to_exclude, uint32_t types_no_prompt,
|
uint32_t types_to_exclude, uint32_t types_no_prompt,
|
||||||
int yes, force_t force)
|
int yes, force_t force)
|
||||||
{
|
{
|
||||||
static const char* msg_failed_offset = "Failed to get offset of the %s signature on %s.";
|
static const char _msg_failed_offset[] = "Failed to get offset of the %s signature on %s.";
|
||||||
static const char* msg_failed_length = "Failed to get length of the %s signature on %s.";
|
static const char _msg_failed_length[] = "Failed to get length of the %s signature on %s.";
|
||||||
static const char* msg_wiping = "Wiping %s signature on %s.";
|
static const char _msg_wiping[] = "Wiping %s signature on %s.";
|
||||||
const char *offset = NULL, *type = NULL, *magic = NULL,
|
const char *offset = NULL, *type = NULL, *magic = NULL,
|
||||||
*usage = NULL, *label = NULL, *uuid = NULL;
|
*usage = NULL, *label = NULL, *uuid = NULL;
|
||||||
loff_t offset_value;
|
loff_t offset_value;
|
||||||
@@ -472,20 +472,20 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
|
|||||||
if (_type_in_flag_list(type, types_to_exclude))
|
if (_type_in_flag_list(type, types_to_exclude))
|
||||||
return 1;
|
return 1;
|
||||||
if (blkid_probe_lookup_value(probe, "SBMAGIC_OFFSET", &offset, NULL)) {
|
if (blkid_probe_lookup_value(probe, "SBMAGIC_OFFSET", &offset, NULL)) {
|
||||||
log_error(msg_failed_offset, type, name);
|
log_error(_msg_failed_offset, type, name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (blkid_probe_lookup_value(probe, "SBMAGIC", &magic, &len)) {
|
if (blkid_probe_lookup_value(probe, "SBMAGIC", &magic, &len)) {
|
||||||
log_error(msg_failed_length, type, name);
|
log_error(_msg_failed_length, type, name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (!blkid_probe_lookup_value(probe, "PTTYPE", &type, NULL)) {
|
} else if (!blkid_probe_lookup_value(probe, "PTTYPE", &type, NULL)) {
|
||||||
if (blkid_probe_lookup_value(probe, "PTMAGIC_OFFSET", &offset, NULL)) {
|
if (blkid_probe_lookup_value(probe, "PTMAGIC_OFFSET", &offset, NULL)) {
|
||||||
log_error(msg_failed_offset, type, name);
|
log_error(_msg_failed_offset, type, name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (blkid_probe_lookup_value(probe, "PTMAGIC", &magic, &len)) {
|
if (blkid_probe_lookup_value(probe, "PTMAGIC", &magic, &len)) {
|
||||||
log_error(msg_failed_length, type, name);
|
log_error(_msg_failed_length, type, name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
usage = "partition table";
|
usage = "partition table";
|
||||||
@@ -508,9 +508,9 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
|
|||||||
yes_no_prompt("WARNING: %s signature detected on %s at offset %s. "
|
yes_no_prompt("WARNING: %s signature detected on %s at offset %s. "
|
||||||
"Wipe it? [y/n] ", type, name, offset) != 'y')
|
"Wipe it? [y/n] ", type, name, offset) != 'y')
|
||||||
return_0;
|
return_0;
|
||||||
log_print_unless_silent(msg_wiping, type, name);
|
log_print_unless_silent(_msg_wiping, type, name);
|
||||||
} else
|
} else
|
||||||
log_verbose(msg_wiping, type, name);
|
log_verbose(_msg_wiping, type, name);
|
||||||
|
|
||||||
if (!dev_set(dev, offset_value, len, 0)) {
|
if (!dev_set(dev, offset_value, len, 0)) {
|
||||||
log_error("Failed to wipe %s signature on %s.", type, name);
|
log_error("Failed to wipe %s signature on %s.", type, name);
|
||||||
|
Reference in New Issue
Block a user