90 lines
1.8 KiB
Plaintext
90 lines
1.8 KiB
Plaintext
$OpenBSD: patch-src_fstime_c,v 1.1 2002/07/17 21:57:21 lebel Exp $
|
|
--- src/fstime.c.orig Wed Feb 5 05:08:45 1992
|
|
+++ src/fstime.c Wed Jul 17 17:36:08 2002
|
|
@@ -37,8 +37,8 @@ int seconds = SECONDS;
|
|
int f;
|
|
int g;
|
|
int i;
|
|
-int stop_count();
|
|
-int clean_up();
|
|
+void stop_count( int );
|
|
+void clean_up( int );
|
|
int sigalarm = 0;
|
|
|
|
/******************** MAIN ****************************/
|
|
@@ -86,11 +86,11 @@ char **argv;
|
|
signal(SIGKILL,clean_up);
|
|
if(w_test() || r_test() || c_test())
|
|
{
|
|
- clean_up();
|
|
+ clean_up(0);
|
|
exit(1);
|
|
}
|
|
/* else */
|
|
- clean_up();
|
|
+ clean_up(0);
|
|
exit(0);
|
|
}
|
|
|
|
@@ -116,7 +116,7 @@ w_test()
|
|
if (errno != EINTR) {
|
|
perror("fstime: write");
|
|
return(-1);
|
|
- } else stop_count();
|
|
+ } else stop_count( 0 );
|
|
}
|
|
++ n_blocks;
|
|
}
|
|
@@ -156,7 +156,7 @@ r_test()
|
|
continue;
|
|
break;
|
|
case EINTR:
|
|
- stop_count();
|
|
+ stop_count( 0 );
|
|
break;
|
|
default:
|
|
perror("fstime: read");
|
|
@@ -200,7 +200,7 @@ c_test()
|
|
continue;
|
|
break;
|
|
case EINTR:
|
|
- stop_count();
|
|
+ stop_count( 0 );
|
|
break;
|
|
default:
|
|
perror("fstime: copy read");
|
|
@@ -212,7 +212,7 @@ c_test()
|
|
if (errno != EINTR) {
|
|
perror("fstime: copy write");
|
|
return(-1);
|
|
- } else stop_count();
|
|
+ } else stop_count( 0 );
|
|
}
|
|
++ n_blocks;
|
|
}
|
|
@@ -223,17 +223,17 @@ c_test()
|
|
return(0);
|
|
}
|
|
|
|
-stop_count()
|
|
+void
|
|
+stop_count( int sigraised)
|
|
{
|
|
extern int sigalarm;
|
|
+(void) sigraised;
|
|
sigalarm = 1;
|
|
-return(0);
|
|
}
|
|
|
|
-clean_up()
|
|
+void
|
|
+clean_up( int sigraised )
|
|
{
|
|
-if( unlink(FNAME0) || unlink(FNAME1))
|
|
- return(-1);
|
|
-else
|
|
- return(0);
|
|
+ (void) sigraised;
|
|
+ unlink(FNAME0) || unlink(FNAME1);
|
|
}
|