summaryrefslogtreecommitdiff
path: root/sysutils/asfsm/files/patch-aa
blob: 9616164a0c391e0c0ba424a35104a7645c03f038 (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
*** asfsm.c.orig	Sun Oct 18 06:02:09 1998
--- asfsm.c	Fri Jun  4 11:10:15 1999
***************
*** 98,107 ****
  	int	flag=0;
  	
  	/* figure out which "df -" command to use */
! 	tempfile=popen("df -Bk","r");
  	fscanf(tempfile,"%s",word);
  	if (!strcmp(word,"Filesystem")) {
! 		sprintf(dfcommand,"df -Bk");
  	} else {
  		tempfile=popen("df -a","r");
  		fscanf(tempfile,"%s",word);
--- 98,107 ----
  	int	flag=0;
  	
  	/* figure out which "df -" command to use */
! 	tempfile=popen("df -k","r");
  	fscanf(tempfile,"%s",word);
  	if (!strcmp(word,"Filesystem")) {
! 		sprintf(dfcommand,"df -k");
  	} else {
  		tempfile=popen("df -a","r");
  		fscanf(tempfile,"%s",word);
***************
*** 135,161 ****
  	}
  	fclose(tempfile);
  
- 	/* detect which user mount/unmount command to use */
- 	/* by giving umnt a bum parameter (-h) and seeing if it */
- 	/* returns anything about an illegal option or if it just says */
- 	/* command not found.  Different shells have different messages */
- 	/* for not finding a command, and which behaves differently too, */
- 	/* so this seems a reasonable way to do it. */
- 	tempfile=popen("umnt -h > /usr/tmp/testumnt 2> /usr/tmp/testumnt; cat /usr/tmp/testumnt; rm /usr/tmp/testumnt","r");
- 	while(!feof(tempfile)) {
- 		fscanf(tempfile,"%s",word);
- 		if (!strcmp("option",word)) {
- 			/* the response must have been 
- 		 	umnt: ERROR: Illegal option -- h
- 		 	or something like it, the command exists */
- 			sprintf(mountcmd,"mnt ");
- 			sprintf(umountcmd,"umnt ");
- 			flag=1;
- 			break;
- 		}
- 	}
- 	pclose(tempfile);
- 
  	if (flag==0) {
  		/* otherwise, the mount/unmount commands must be used */
  		sprintf(mountcmd,"mount ");
--- 135,140 ----
***************
*** 374,380 ****
  				fs[counter].percent,
  				fs[counter].mountdir);
  			if (strlen(fs[counter].mountdir)>0 && counter<23) {	
! 				if (atoi(fs[counter].blocks)>0 || showzero==1) {
  					counter++;
  				}
  			} else {
--- 353,360 ----
  				fs[counter].percent,
  				fs[counter].mountdir);
  			if (strlen(fs[counter].mountdir)>0 && counter<23) {	
! 				if ((atoi(fs[counter].blocks)>0 || showzero==1) &&
! 									(strcmp(fs[counter].mountdir, "/proc"))){
  					counter++;
  				}
  			} else {
***************
*** 721,727 ****
  			};
  
  			if (!feof(fstabfile)) {
! 				if (buffer[0]!='#') {
  					strcpy(fstab[fstabcounter].filesystem,
  						"");
  					strcpy(fstab[fstabcounter].mountdir,"");
--- 701,707 ----
  			};
  
  			if (!feof(fstabfile)) {
! 				if (buffer[0]!='#' && strncmp(buffer, "proc", 4)) {
  					strcpy(fstab[fstabcounter].filesystem,
  						"");
  					strcpy(fstab[fstabcounter].mountdir,"");