Blob Blame History Raw
diff -up sysstat-8.0.4/man/iostat.1.pom sysstat-8.0.4/man/iostat.1
--- sysstat-8.0.4/man/iostat.1.pom	2008-12-05 11:12:36.000000000 +0100
+++ sysstat-8.0.4/man/iostat.1	2008-12-05 11:18:33.000000000 +0100
@@ -445,7 +445,7 @@ Display the network filesystem (NFS) rep
 .IP -h 
 Display the NFS report more human readable.
 .IP "-p [ { device | ALL } ]"
-The -p option is exclusive of the -x option and displays statistics for
+The -p option displays statistics for 
 block devices and all their partitions that are used by the system.
 If a device name is entered on the command line, then statistics for it
 and all its partitions are displayed. Last, the
@@ -453,6 +453,8 @@ and all its partitions are displayed. La
 keyword indicates that statistics have to be displayed for all the block
 devices and partitions defined by the system, including those that have
 never been used.
+Some kernels does not produce extended statistic for partitions so then 
+the combination of -p and -x options return an error. 
 Note that this option works only with post 2.5 kernels.
 .IP -t
 Print the time for each report displayed. The timestamp format may depend
diff -up sysstat-8.0.4/iostat.c.pom sysstat-8.0.4/iostat.c
--- sysstat-8.0.4/iostat.c.pom	2008-12-05 11:12:36.000000000 +0100
+++ sysstat-8.0.4/iostat.c	2008-12-05 11:20:20.000000000 +0100
@@ -733,8 +733,10 @@ void read_diskstats_stat(int curr, int f
       }
       else if (i == 7) {
 	 /* Partition */
-	 if (DISPLAY_EXTENDED(flags) || (!dlist_idx && !DISPLAY_PARTITIONS(flags)))
-	    continue;
+	 if (DISPLAY_EXTENDED(flags) || (!dlist_idx && !DISPLAY_PARTITIONS(flags))) {
+            fprintf(stderr, _("Your kernel does not produce data for partition extended statistics\n"));
+            exit(1); 
+         }
 
 	 sdev.rd_ios     = rd_ios;
 	 sdev.rd_sectors = rd_merges_or_rd_sec;
@@ -1471,12 +1473,6 @@ int main(int argc, char **argv)
        DISPLAY_UNFILTERED(flags))
       flags |= I_D_DISK;
 
-   /* Linux does not provide extended stats for partitions nor for NFS directories */
-   if (DISPLAY_PARTITIONS(flags) && DISPLAY_EXTENDED(flags)) {
-      fprintf(stderr, _("-x and -p options are mutually exclusive\n"));
-      exit(1);
-   }
-
    /* Ignore device list if '-p ALL' entered on the command line */
    if (DISPLAY_PART_ALL(flags))
       dlist_idx = 0;