]> andersk Git - moira.git/blobdiff - update/checksum.c
added support for fsgroups
[moira.git] / update / checksum.c
index c2336aafcbfbb258ada9b9e7aec34846de7cc255..e98abbc7b9c3c1d2bb2f82715e5807861ce29f9d 100644 (file)
@@ -2,11 +2,15 @@
  *     $Source$
  *     $Header$
  */
+/*  (c) Copyright 1988 by the Massachusetts Institute of Technology. */
+/*  For copying and distribution information, please see the file */
+/*  <mit-copyright.h>. */
 
 #ifndef lint
 static char *rcsid_checksum_c = "$Header$";
 #endif lint
 
+#include <mit-copyright.h>
 #include <stdio.h>
 #include <sys/file.h>
 
@@ -16,18 +20,15 @@ static char *rcsid_checksum_c = "$Header$";
  */
 
 int
-checksum_fd(fd1)
-    int fd1;
+checksum_file(path)
+char *path;
 {
-    int fd;
     register int sum;
     register int ch;
     register FILE *f;
 
-    fd = dup(fd1);
     sum = 0;
-    (void) lseek(fd, 0, L_SET);
-    f = fdopen(fd, "r");
+    f = fopen(path, "r");
     while ((ch = getc(f)) != EOF) {
        sum = (sum + ch) & ((1<<24)-1);
     }
This page took 0.031511 seconds and 4 git commands to generate.