[linux-lvm] [Patch] lvchange better error reporting
Heinz Mauelshagen
mauelsha at ez-darmstadt.telekom.de
Wed Apr 19 19:50:03 UTC 2000
Applied.
Regards,
Heinz
> Heinz, people,
>
> It annoyed me that lvchange sometimes reported that volume group "(null)"
> was invalid. This patch fixes this behaviour. Please apply.
>
> diff -u -r 0.8final.orig/tools/lvchange.c 0.8final/tools/lvchange.c
> --- 0.8final.orig/tools/lvchange.c Tue Feb 22 03:09:33 2000
> +++ 0.8final/tools/lvchange.c Sat Apr 15 20:32:34 2000
> @@ -255,9 +255,15 @@
> /* does VG exist? */
> if ( opt_v > 0) printf ( "%s -- checking volume group existence\n", cmd);
> if ( lvm_tab_vg_check_exist ( vg_name, NULL) != TRUE) {
> - fprintf ( stderr, "%s -- can't change logical volume: volume group "
> - "\"%s\" doesn't exist\n\n", cmd, vg_name);
> - return LVM_ELVCHANGE_VG_CHECK_EXIST;
> +
> + if(vg_name)
> + fprintf ( stderr, "%s -- can't change logical volume: volume group "
> + "\"%s\" doesn't exist\n\n", cmd, vg_name);
> + else
> + fprintf ( stderr, "%s -- can't change logical volume: need to specify "
> + "volume group\n\n", cmd);
> +
> + return LVM_ELVCHANGE_VG_CHECK_EXIST;
> }
>
> if ( opt_v > 0) printf ( "%s -- checking for active volume "
>
> --
> | http://www.rent-a-nerd.nl
> | - U N I X -
> | Inspice et cautus eris - D11T'95
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Systemmanagement TS T-Nova
Entwicklungszentrum Darmstadt
Heinz Mauelshagen Otto-Roehm-Strasse 71c
Senior Systems Engineer Postfach 10 05 41
64205 Darmstadt
mge at EZ-Darmstadt.Telekom.de Germany
+49 6151 886-425
FAX-386
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
More information about the linux-lvm
mailing list