mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Remove dead code, is_lvm_partition() - no functional change.
This code does nothing. The function is #defined to 1 which ensures the only two if statements referencing it will never be true.
This commit is contained in:
parent
61bc35aa12
commit
f2d0cc63fd
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.40 -
|
Version 2.02.40 -
|
||||||
================================
|
================================
|
||||||
|
Remove dead code, is_lvm_partition() - no functional change.
|
||||||
Refactor pvcreate to divide parameter parsing & validation from create logic.
|
Refactor pvcreate to divide parameter parsing & validation from create logic.
|
||||||
Check for label_write() failure in _text_pv_write().
|
Check for label_write() failure in _text_pv_write().
|
||||||
Add pvcreate tests and update vgsplit tests to handle lvm1 and lvm2 metadata.
|
Add pvcreate tests and update vgsplit tests to handle lvm1 and lvm2 metadata.
|
||||||
|
@ -94,11 +94,6 @@ const char *dev_name_confirmed(struct device *dev, int quiet);
|
|||||||
/* Does device contain md superblock? If so, where? */
|
/* Does device contain md superblock? If so, where? */
|
||||||
int dev_is_md(struct device *dev, uint64_t *sb);
|
int dev_is_md(struct device *dev, uint64_t *sb);
|
||||||
|
|
||||||
/* FIXME Check partition type if appropriate */
|
|
||||||
|
|
||||||
#define is_lvm_partition(a) 1
|
|
||||||
/* int is_lvm_partition(const char *name); */
|
|
||||||
|
|
||||||
int is_partitioned_dev(struct device *dev);
|
int is_partitioned_dev(struct device *dev);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -37,13 +37,6 @@ static int pvcreate_check(struct cmd_context *cmd, const char *name)
|
|||||||
struct device *dev;
|
struct device *dev;
|
||||||
uint64_t md_superblock;
|
uint64_t md_superblock;
|
||||||
|
|
||||||
/* is the partition type set correctly ? */
|
|
||||||
if ((arg_count(cmd, force_ARG) < 1) && !is_lvm_partition(name)) {
|
|
||||||
log_error("%s: Not LVM partition type: use -f to override",
|
|
||||||
name);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is there a pv here already? */
|
/* Is there a pv here already? */
|
||||||
/* FIXME Use partial mode here? */
|
/* FIXME Use partial mode here? */
|
||||||
pv = pv_read(cmd, name, NULL, NULL, 0);
|
pv = pv_read(cmd, name, NULL, NULL, 0);
|
||||||
|
@ -26,13 +26,6 @@ static int pvremove_check(struct cmd_context *cmd, const char *name)
|
|||||||
{
|
{
|
||||||
struct physical_volume *pv;
|
struct physical_volume *pv;
|
||||||
|
|
||||||
/* is the partition type set correctly ? */
|
|
||||||
if ((arg_count(cmd, force_ARG) < 1) && !is_lvm_partition(name)) {
|
|
||||||
log_error("%s: Not LVM partition type: use -f to override",
|
|
||||||
name);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is there a pv here already? */
|
/* Is there a pv here already? */
|
||||||
/* If not, this is an error unless you used -f. */
|
/* If not, this is an error unless you used -f. */
|
||||||
if (!(pv = pv_read(cmd, name, NULL, NULL, 1))) {
|
if (!(pv = pv_read(cmd, name, NULL, NULL, 1))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user