partitions are collected if a selection is made. If no selection is configured
at all, B<all> partitions are selected.
+=item B<ReportByDevice> I<true>|I<false>
+
+Report using the device name rather than the mountpoint. i.e. with this I<false>,
+(the default), it will report a disk as "root", but with it I<true>, it will be
+"sda1" (or whichever).
+
=back
=head2 Plugin C<disk>
|| (strcasecmp (value, "Yes") == 0)
|| (strcasecmp (value, "On") == 0))
{
- by_device = false;
+ by_device = true;
}
return (0);
}
if (by_device)
{
// eg, /dev/hda1 -- strip off the "/dev/"
- strncpy (disk_name, mnt_ptr->device + 5, sizeof (disk_name));
+ strncpy (disk_name, mnt_ptr->spec_device + 5, sizeof (disk_name));
+ if (strlen(disk_name) < 1)
+ {
+ DEBUG("df: no device name name for mountpoint %s, skipping", mnt_ptr->dir);
+ continue;
+ }
}
else
{