summaryrefslogtreecommitdiffstats
path: root/web/attachments/49931-check_disk.patch
blob: 44ea1c46f7797fcde1fd58f927a7dc1367706d14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- check_disk.c.orig	Mon Mar 24 13:23:39 2003
+++ check_disk.c	Mon Mar 24 13:26:47 2003
@@ -55,6 +55,7 @@
 char *exclude_device = "";
 int verbose = 0;
 int display_mntp = FALSE;
+int local = FALSE;
 
 
 int
@@ -75,7 +76,11 @@
 	if (process_arguments (argc, argv) != OK)
 		usage ("Could not parse arguments\n");
 
-	asprintf (&command_line, "%s %s", DF_COMMAND, path);
+        if (local) {
+		asprintf (&command_line, "%s -l %s", DF_COMMAND, path);
+	} else {
+		asprintf (&command_line, "%s %s", DF_COMMAND, path);
+	}
 
 	if (verbose>0)
 		printf ("%s ==> ", command_line);
@@ -169,6 +174,7 @@
 		{"verbose", no_argument, 0, 'v'},
 		{"version", no_argument, 0, 'V'},
 		{"help", no_argument, 0, 'h'},
+		{"local", no_argument, 0, 'l'},
 		{"mountpoint", no_argument, 0, 'm'},
 		{"exclude_device", required_argument, 0, 'x'},
 		{"quiet", no_argument, 0, 'q'},
@@ -187,9 +193,9 @@
 	while (1) {
 #ifdef HAVE_GETOPT_H
 		c =
- 			getopt_long (argc, argv, "+?Vqhvt:c:w:p:x:m", long_options, &option_index);
+ 			getopt_long (argc, argv, "+?Vqhvt:c:w:p:x:lm", long_options, &option_index);
 #else
- 		c = getopt (argc, argv, "+?Vqhvt:c:w:p:x:m");
+ 		c = getopt (argc, argv, "+?Vqhvt:c:w:p:x:lm");
 #endif
 
 		if (c == -1 || c == EOF)
@@ -247,6 +253,9 @@
 			break;
 		case 'm': /* display mountpoint */
 			display_mntp = TRUE;
+			break;
+		case 'l':
+			local = TRUE;
 			break;
  		case 'x':									/* exclude path or partition */
  			exclude_device = optarg;