[Nagiosplug-devel] check_disk.c HEAD without -d parameters
Voon, Ton
Ton.Voon at egg.com
Wed Jun 25 06:59:12 CEST 2003
Just wanted to see what the consensus was on this change. v1.23 wanted:
check_disk -d /dev/dsk/c0t0d0s5
in order to test a physical partition. The change below removes this so that
you can use:
check_disk -p /dev/dsk/c0t0d0s5
as you would have done in the r1_3_0 version of check_disk. I didn't think
there was a need to use a separate flag to specify devices.
Any thoughts? I can backout if people think -d is better.
Ton
> -----Original Message-----
> From: Ton Voon [SMTP:tonvoon at users.sourceforge.net]
> Sent: Wednesday, June 25, 2003 2:38 PM
> To: nagiosplug-checkins at lists.sourceforge.net
> Subject: [Nagiosplug-checkins] CVS: nagiosplug/plugins
> check_disk.c,1.23,1.24
>
> Update of /cvsroot/nagiosplug/nagiosplug/plugins
> In directory sc8-pr-cvs1:/tmp/cvs-serv31012
>
> Modified Files:
> check_disk.c
> Log Message:
> Removed -d option and just check against -p parameter
>
>
> Index: check_disk.c
> ===================================================================
> RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_disk.c,v
> retrieving revision 1.23
> retrieving revision 1.24
> diff -C2 -r1.23 -r1.24
> *** check_disk.c 25 Jun 2003 13:28:05 -0000 1.23
> --- check_disk.c 25 Jun 2003 13:38:22 -0000 1.24
> ***************
> *** 202,209 ****
> for (me = mount_list; me; me = me->me_next) {
>
> ! if ((dev_select_list &&
> ! walk_name_list (dev_select_list, me->me_devname)) ||
> ! (path_select_list &&
> ! walk_name_list (path_select_list, me->me_mountdir)))
> get_fs_usage (me->me_mountdir, me->me_devname,
> &fsp);
> else if (dev_select_list || path_select_list)
> --- 202,208 ----
> for (me = mount_list; me; me = me->me_next) {
>
> ! if (path_select_list &&
> ! (walk_name_list (path_select_list, me->me_mountdir) ||
> ! walk_name_list (path_select_list, me->me_devname) ) )
> get_fs_usage (me->me_mountdir, me->me_devname,
> &fsp);
> else if (dev_select_list || path_select_list)
> ***************
> *** 276,284 ****
> {
> int c;
> ! struct name_list *se;
> ! struct name_list **pathtail = &path_select_list;
> ! struct name_list **devtail = &dev_select_list;
> ! struct name_list **fstail = &fs_exclude_list;
> ! struct name_list **dptail = &dp_exclude_list;
>
> int option_index = 0;
> --- 275,283 ----
> {
> int c;
> ! struct name_list *se;
> ! struct name_list **pathtail = &path_select_list;
> ! struct name_list **devtail = &dev_select_list;
> ! struct name_list **fstail = &fs_exclude_list;
> ! struct name_list **dptail = &dp_exclude_list;
>
> int option_index = 0;
> ***************
> *** 293,297 ****
> {"path", required_argument, 0, 'p'},
> {"partition", required_argument, 0, 'p'},
> - {"device", required_argument, 0, 'd'},
> {"exclude_device", required_argument, 0, 'x'},
> {"exclude-type", required_argument, 0, 'X'},
> --- 292,295 ----
> ***************
> *** 319,323 ****
>
> while (1) {
> ! c = getopt_long (argc, argv, "+?Vqhvet:c:w:u:p:d:x:X:mklM",
> long_options, &option_index);
>
> if (c == -1 || c == EOF)
> --- 317,321 ----
>
> while (1) {
> ! c = getopt_long (argc, argv, "+?Vqhvet:c:w:u:p:x:X:mklM",
> long_options, &option_index);
>
> if (c == -1 || c == EOF)
> ***************
> *** 402,412 ****
> *pathtail = se;
> pathtail = &se->name_next;
> - break;
> - case 'd':
> /* select partition/device */
> - se = (struct name_list *) malloc (sizeof (struct
> name_list));
> - se->name = strdup (optarg);
> - se->name_next = NULL;
> - *devtail = se;
> - devtail = &se->name_next;
> break;
> case 'x':
> /* exclude path or partition */
> --- 400,403 ----
>
This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.
More information about the Devel
mailing list