830a0c2
Only in e2tools-0.0.16.fedora: _b
830a0c2
Only in e2tools-0.0.16.fedora: configure.in~
830a0c2
diff -rup e2tools-0.0.16.orig/copy.c e2tools-0.0.16.fedora/copy.c
830a0c2
--- e2tools-0.0.16.orig/copy.c	2004-04-07 03:15:20.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/copy.c	2006-07-17 11:55:48.000000000 +0200
830a0c2
@@ -239,11 +239,10 @@ copy(int argc, char *argv[])
830a0c2
 {
830a0c2
   ext2_filsys fs = NULL;
830a0c2
   ext2_ino_t root;
830a0c2
-  ext2_ino_t orig_cwd;
830a0c2
+  ext2_ino_t orig_cwd = -1;
830a0c2
   ext2_ino_t cwd;
830a0c2
   char tmpbuf[BUF_SIZE];
830a0c2
   char outpath[BUF_SIZE];
830a0c2
-  char *last_filesys = NULL;
830a0c2
   char *cur_filesys = NULL;
830a0c2
   int retval;
830a0c2
   int c;
830a0c2
@@ -251,7 +250,7 @@ copy(int argc, char *argv[])
830a0c2
   char *dest_dir = NULL;
830a0c2
   char *in_file = NULL;
830a0c2
   char *out_file = NULL;
830a0c2
-  int max_out_len;
830a0c2
+  int max_out_len = -1;
830a0c2
   int keep = 0;
830a0c2
   int absolute = 0;
830a0c2
   int verbose = 0;
830a0c2
@@ -1054,7 +1053,6 @@ read_string(char *inbuf)
830a0c2
   char *ptr;
830a0c2
   char *boundary;
830a0c2
   int c;
830a0c2
-  int cnt;
830a0c2
 
830a0c2
   boundary = inbuf + BUF_SIZE - 1;
830a0c2
   ptr = inbuf;
830a0c2
Only in e2tools-0.0.16.fedora: copy.c~
830a0c2
diff -rup e2tools-0.0.16.orig/e2tools.h e2tools-0.0.16.fedora/e2tools.h
830a0c2
--- e2tools-0.0.16.orig/e2tools.h	2004-04-07 03:15:55.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/e2tools.h	2006-07-17 12:02:16.000000000 +0200
830a0c2
@@ -57,44 +57,45 @@ extern int optreset;		/* defined by BSD,
830a0c2
 #include <fcntl.h>
830a0c2
 #include <sys/types.h>
830a0c2
 #include <sys/stat.h>
830a0c2
+#include <regex.h>
830a0c2
 #include "ext2fs/ext2_fs.h"
830a0c2
 #include "ext2fs/ext2fs.h"
830a0c2
 
830a0c2
 #define E2T_FORCE 1
830a0c2
 #define E2T_DO_MV 2
830a0c2
 
830a0c2
-#ifndef COPY_C
830a0c2
+/* from copy.c */
830a0c2
 extern long copy(int argc, char *argv[]);
830a0c2
 extern int my_strcmp(const void *n1, const void *n2);
830a0c2
-#endif
830a0c2
 
830a0c2
-#ifdef LN_C
830a0c2
+
830a0c2
+/* from ln.c */
830a0c2
 extern long do_ln(int argc, char *argv[]);
830a0c2
 
830a0c2
 extern long create_hard_link(ext2_filsys fs, ext2_ino_t cwd, ext2_ino_t
830a0c2
                              new_file_ino, char *newfile, int ln_flags);
830a0c2
-#endif
830a0c2
 
830a0c2
-#ifndef LS_C
830a0c2
+
830a0c2
+/* from ls.c */
830a0c2
 extern long do_list_dir(int argc, char *argv[]);
830a0c2
-#endif
830a0c2
 
830a0c2
-#ifndef MKDIR_C
830a0c2
+
830a0c2
+/* from mkdir.c */
830a0c2
 extern long e2mkdir(int argc, char *argv[]);
830a0c2
 extern long create_dir(ext2_filsys fs, ext2_ino_t root, ext2_ino_t *cwd,
830a0c2
                        char *dirname, struct stat *def_stat);
830a0c2
-#endif
830a0c2
+extern long change_cwd(ext2_filsys fs, ext2_ino_t root, ext2_ino_t *cwd,
830a0c2
+		       char *dirname);
830a0c2
 
830a0c2
-#ifdef MV_C
830a0c2
+
830a0c2
+/* from mv.c */
830a0c2
 extern long do_mv(int argc, char *argv[]);
830a0c2
 extern long get_file_parts(ext2_filsys fs, ext2_ino_t root, char *pathname,
830a0c2
                            ext2_ino_t *dir_ino, char **dir_name,
830a0c2
                            char **base_name);
830a0c2
 
830a0c2
-#endif
830a0c2
-
830a0c2
 
830a0c2
-#ifndef READ_C
830a0c2
+/* from read.c */
830a0c2
 extern long get_file(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
830a0c2
                      char *infile, char *outfile, int keep);
830a0c2
 extern long retrieve_data(ext2_filsys fs, ext2_ino_t src, int dest_fd,
830a0c2
@@ -102,17 +103,17 @@ extern long retrieve_data(ext2_filsys fs
830a0c2
                           ext2_off_t *ret_pos);
830a0c2
 extern long read_to_eof(ext2_file_t infile, int dest_fd, ext2_off_t offset,
830a0c2
                         ext2_off_t *ret_pos);
830a0c2
-#endif
830a0c2
 
830a0c2
-#ifndef RM_C
830a0c2
+
830a0c2
+/* from rm.c */
830a0c2
 extern long e2rm(int argc, char *argv[]);
830a0c2
 #endif
830a0c2
 
830a0c2
-#ifndef TAIL_C
830a0c2
+/* from tail.c */
830a0c2
 extern long do_tail(int argc, char *argv[]);
830a0c2
-#endif
830a0c2
 
830a0c2
-#ifndef UTIL_C
830a0c2
+
830a0c2
+/* from util.c */
830a0c2
 extern mode_t ext2_mode_xlate(__u16 lmode);
830a0c2
 extern __u16 host_mode_xlate(mode_t hmode);
830a0c2
 extern long open_filesystem(char *name, ext2_filsys *fs, ext2_ino_t *root, int
830a0c2
@@ -125,14 +126,12 @@ extern long rm_file(ext2_filsys fs, ext2
830a0c2
                     delfile); 
830a0c2
 extern long delete_file(ext2_filsys fs, ext2_ino_t inode);
830a0c2
 extern void init_stat_buf(struct stat *buf);
830a0c2
-#endif
830a0c2
+extern int  is_file_regexp(char *ptr);
830a0c2
+extern regex_t *make_regexp(char *shell);
830a0c2
 
830a0c2
-#ifndef WRITE_C
830a0c2
+/* from write.c */
830a0c2
 extern long
830a0c2
 put_file(ext2_filsys fs, ext2_ino_t cwd, char *infile, char *outfile,
830a0c2
          ext2_ino_t *outfile_ino, int keep, struct stat *def_stat);
830a0c2
-#endif
830a0c2
-
830a0c2
-#endif
830a0c2
 
830a0c2
 
830a0c2
Only in e2tools-0.0.16.fedora: e2tools.h~
830a0c2
Only in e2tools-0.0.16.fedora: e2tools-test.sh
830a0c2
Only in e2tools-0.0.16.fedora: e2tools-test.sh~
830a0c2
diff -rup e2tools-0.0.16.orig/elist.c e2tools-0.0.16.fedora/elist.c
830a0c2
--- e2tools-0.0.16.orig/elist.c	2004-04-06 22:00:16.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/elist.c	2006-07-17 11:44:07.000000000 +0200
830a0c2
@@ -41,6 +41,7 @@
830a0c2
 /* Feature Test Switches */
830a0c2
 /* Headers */
830a0c2
 #include <memory.h>
830a0c2
+#include <stdlib.h>
830a0c2
 #include "elist.h"
830a0c2
 
830a0c2
 #ifndef NULL
830a0c2
@@ -79,8 +80,6 @@ elist_delete(elist_t *l, void (*data_fre
830a0c2
 void
830a0c2
 elist_free(elist_t *l, void (*data_free)(void *))
830a0c2
 {
830a0c2
-  elist_t *n;
830a0c2
-  
830a0c2
   if (l)
830a0c2
     {
830a0c2
       do
830a0c2
@@ -136,7 +135,7 @@ elist_insert(elist_t *l, void *data)
830a0c2
   return(l);
830a0c2
 }
830a0c2
 
830a0c2
-void elist_sort(elist_t *l, int (sort_func)(void *, void *), int reverse)
830a0c2
+void elist_sort(elist_t *l, int (*sort_func)(const void *, const void *), int reverse)
830a0c2
 {
830a0c2
   int c=0;
830a0c2
   elist_t *tl;
830a0c2
Only in e2tools-0.0.16.fedora: elist.c~
830a0c2
Only in e2tools-0.0.16.fedora: _i
830a0c2
diff -rup e2tools-0.0.16.orig/ln.c e2tools-0.0.16.fedora/ln.c
830a0c2
--- e2tools-0.0.16.orig/ln.c	2002-06-30 07:54:02.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/ln.c	2006-07-17 11:44:27.000000000 +0200
830a0c2
@@ -95,7 +95,6 @@ do_ln(int argc, char *argv[])
830a0c2
   int verbose=0;
830a0c2
   int force=0;
830a0c2
   int symlink=0;
830a0c2
-  int num_files;
830a0c2
   int errcnt=0;
830a0c2
   char *cur_filesys = NULL;
830a0c2
   ext2_filsys fs = NULL;
830a0c2
Only in e2tools-0.0.16.fedora: ln.c~
830a0c2
diff -rup e2tools-0.0.16.orig/ls.c e2tools-0.0.16.fedora/ls.c
830a0c2
--- e2tools-0.0.16.orig/ls.c	2004-04-07 05:31:39.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/ls.c	2006-07-17 11:48:12.000000000 +0200
830a0c2
@@ -143,7 +143,6 @@ static int
830a0c2
 list_dir_proc(ext2_ino_t dir, int entry, struct ext2_dir_entry *dirent,
830a0c2
               int offset, int blocksize, char *buf, void *private)
830a0c2
 {
830a0c2
-  struct ext2_inode	inode;
830a0c2
   char			name[EXT2_NAME_LEN];
830a0c2
   struct list_dir_struct *ls = (struct list_dir_struct *) private;
830a0c2
   int thislen;
830a0c2
@@ -485,7 +484,7 @@ do_list_dir(int argc, char *argv[])
830a0c2
       if (ls.options & DELETED_OPT)
830a0c2
         flags |= DIRENT_FLAG_INCLUDE_REMOVED;
830a0c2
             
830a0c2
-      if (retval = ext2fs_check_directory(fs, inode))
830a0c2
+      if ((retval = ext2fs_check_directory(fs, inode)))
830a0c2
         {
830a0c2
         if (retval != EXT2_ET_NO_DIRECTORY)
830a0c2
             {
830a0c2
@@ -703,7 +702,7 @@ void short_disp(ls_file_t *info, int *co
830a0c2
   char lbr, rbr;
830a0c2
   char tmp[300];
830a0c2
   int thislen;
830a0c2
-  static max_col_size = 0;
830a0c2
+  static int max_col_size = 0;
830a0c2
 
830a0c2
   if (max_col_size == 0)
830a0c2
     {
830a0c2
@@ -1023,9 +1022,7 @@ int creat_time_sort(void *n1, void *n2)
830a0c2
 elist_t * remove_ls_dups(elist_t *list)
830a0c2
 {
830a0c2
   elist_t *start = list;
830a0c2
-  elist_t *next;
830a0c2
   ls_file_t *cd;
830a0c2
-  ls_file_t *nd;
830a0c2
   int cnt=0;
830a0c2
 
830a0c2
   while(list != NULL)
830a0c2
Only in e2tools-0.0.16.fedora: ls.c~
830a0c2
diff -rup e2tools-0.0.16.orig/Makefile.am e2tools-0.0.16.fedora/Makefile.am
830a0c2
--- e2tools-0.0.16.orig/Makefile.am	2003-07-12 19:06:54.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/Makefile.am	2006-07-17 12:22:28.000000000 +0200
830a0c2
@@ -27,3 +27,11 @@ install-exec-hook:
830a0c2
 	$(LN_S) -f e2cp $(DESTDIR)$(bindir)/e2mv
830a0c2
 	$(LN_S) -f e2cp $(DESTDIR)$(bindir)/e2rm
830a0c2
 	$(LN_S) -f e2cp $(DESTDIR)$(bindir)/e2tail
830a0c2
+
830a0c2
+uninstall-exec-hook:
830a0c2
+	$(RM) -f $(DESTDIR)$(bindir)/e2ln
830a0c2
+	$(RM) -f $(DESTDIR)$(bindir)/e2ls
830a0c2
+	$(RM) -f $(DESTDIR)$(bindir)/e2mkdir
830a0c2
+	$(RM) -f $(DESTDIR)$(bindir)/e2mv
830a0c2
+	$(RM) -f $(DESTDIR)$(bindir)/e2rm
830a0c2
+	$(RM) -f $(DESTDIR)$(bindir)/e2tail
830a0c2
Only in e2tools-0.0.16.fedora: Makefile.am~
830a0c2
Only in e2tools-0.0.16.fedora: Makefile.in~
830a0c2
diff -rup e2tools-0.0.16.orig/mkdir.c e2tools-0.0.16.fedora/mkdir.c
830a0c2
--- e2tools-0.0.16.orig/mkdir.c	2004-04-07 05:19:32.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/mkdir.c	2006-07-17 12:06:33.000000000 +0200
830a0c2
@@ -281,7 +281,6 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
830a0c2
   ext2_ino_t parent;          /* the parent directory inode number*/
830a0c2
   ext2_ino_t child;           /* the inode number of the new directory */
830a0c2
   struct ext2_inode inode;    /* inode of file/directory dirname */
830a0c2
-  char *name;                 /* basename of the new directory */
830a0c2
   long retval;                /* function return value */
830a0c2
   char *buf;
830a0c2
   int len;
830a0c2
@@ -315,7 +314,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
830a0c2
         parent = *cwd;
830a0c2
 
830a0c2
       /* allocate memory for the lookups */
830a0c2
-      if ((retval = ext2fs_get_mem(fs->blocksize, (void **) &buf)))
830a0c2
+      if ((retval = ext2fs_get_mem(fs->blocksize, (void *) &buf)))
830a0c2
         {
830a0c2
           fprintf(stderr, "%s\n", error_message(retval));
830a0c2
           return retval;
830a0c2
@@ -357,16 +356,16 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
830a0c2
                                               def_stat)))
830a0c2
                     {
830a0c2
                       fprintf(stderr,
830a0c2
-                              "create_dir: error creating directory %s/%s:%d\n",
830a0c2
+                              "create_dir: error creating directory %s/%s:%ld\n",
830a0c2
                               dirname, dname, retval);
830a0c2
-                      ext2fs_free_mem((void **) &buf;;
830a0c2
+                      ext2fs_free_mem((void *) &buf;;
830a0c2
                       return(retval);
830a0c2
                     }
830a0c2
                 }
830a0c2
               else
830a0c2
                 {
830a0c2
                   fprintf(stderr, "%s\n", error_message(retval));
830a0c2
-                  ext2fs_free_mem((void **) &buf;;
830a0c2
+                  ext2fs_free_mem((void *) &buf;;
830a0c2
                   return retval;
830a0c2
                 }
830a0c2
             }
830a0c2
@@ -380,7 +379,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
830a0c2
                                                &parent)))
830a0c2
                 {
830a0c2
                   fprintf(stderr, "%s\n", error_message(retval));
830a0c2
-                  ext2fs_free_mem((void **) &buf;;
830a0c2
+                  ext2fs_free_mem((void *) &buf;;
830a0c2
                   return retval;
830a0c2
                 }
830a0c2
 
830a0c2
@@ -388,7 +387,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
830a0c2
               if ((retval = ext2fs_read_inode(fs, parent, &inode)))
830a0c2
                 {
830a0c2
                   fprintf(stderr, "%s\n", error_message(retval));
830a0c2
-                  ext2fs_free_mem((void **) &buf;;
830a0c2
+                  ext2fs_free_mem((void *) &buf;;
830a0c2
                   return retval;
830a0c2
                 }
830a0c2
 
830a0c2
@@ -397,7 +396,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
830a0c2
                 {
830a0c2
                   fprintf(stderr, "create_dir: %s/%s is not a directory: %o\n",
830a0c2
                           dirname, dname, inode.i_mode);
830a0c2
-                  ext2fs_free_mem((void **) &buf;;
830a0c2
+                  ext2fs_free_mem((void *) &buf;;
830a0c2
                   return(-1);
830a0c2
                 }
830a0c2
             }
830a0c2
@@ -407,7 +406,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
830a0c2
             *--dname = '/';
830a0c2
           dname = ptr;
830a0c2
         }
830a0c2
-      ext2fs_free_mem((void **) &buf;;
830a0c2
+      ext2fs_free_mem((void *) &buf;;
830a0c2
       *cwd = parent;
830a0c2
     }
830a0c2
   else
830a0c2
@@ -415,7 +414,7 @@ create_dir(ext2_filsys fs, ext2_ino_t ro
830a0c2
       if ((retval = create_subdir(fs, root, cwd, dirname, def_stat)))
830a0c2
         {
830a0c2
           fprintf(stderr,
830a0c2
-                  "create_dir: error creating directory %s:%d\n",
830a0c2
+                  "create_dir: error creating directory %s:%ld\n",
830a0c2
                   dirname, retval);
830a0c2
           return(retval);
830a0c2
         }
830a0c2
@@ -493,7 +492,7 @@ long create_subdir(ext2_filsys fs, ext2_
830a0c2
       return(0);
830a0c2
     }
830a0c2
   
830a0c2
-  /* ok, the directory doesn't exist
830a0c2
+  /* ok, the directory doesn't exist */
830a0c2
   /* get a new inode number */
830a0c2
   if ((retval = ext2fs_new_inode(fs, parent, LINUX_S_IFDIR | 0755, 0, &child)))
830a0c2
     {
830a0c2
Only in e2tools-0.0.16.fedora: mkdir.c~
830a0c2
diff -rup e2tools-0.0.16.orig/mv.c e2tools-0.0.16.fedora/mv.c
830a0c2
--- e2tools-0.0.16.orig/mv.c	2002-06-09 23:30:25.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/mv.c	2006-07-17 11:58:30.000000000 +0200
830a0c2
@@ -84,7 +84,6 @@ do_mv(int argc, char *argv[])
830a0c2
   int verbose=0;
830a0c2
   int force=0;
830a0c2
   int swap_files=0;
830a0c2
-  int num_files;
830a0c2
   int errcnt=0;
830a0c2
   char *cur_filesys = NULL;
830a0c2
   ext2_filsys fs = NULL;
830a0c2
Only in e2tools-0.0.16.fedora: mv.c~
830a0c2
Only in e2tools-0.0.16.fedora: mv.h
830a0c2
Only in e2tools-0.0.16.fedora: mv.h~
830a0c2
diff -rup e2tools-0.0.16.orig/progress.c e2tools-0.0.16.fedora/progress.c
830a0c2
--- e2tools-0.0.16.orig/progress.c	2002-06-26 13:18:07.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/progress.c	2006-07-17 11:46:38.000000000 +0200
830a0c2
@@ -27,6 +27,7 @@
830a0c2
 /* System Headers */
830a0c2
 #include <stdio.h>
830a0c2
 #include <unistd.h>
830a0c2
+#include <string.h>
830a0c2
 #include <sys/stat.h>
830a0c2
 #include <sys/time.h>
830a0c2
 
830a0c2
@@ -154,7 +155,7 @@ void update_progress(unsigned long num_b
830a0c2
   if (prog_sbuf != NULL && prog_time != tv.tv_sec)
830a0c2
     {
830a0c2
       prog_time = tv.tv_sec;
830a0c2
-      fprintf(stderr, "%s %10d / %10d\r", prog_file, num_bytes,
830a0c2
+      fprintf(stderr, "%s %10ld / %10ld\r", prog_file, num_bytes,
830a0c2
               prog_sbuf->st_size);
830a0c2
       fflush(stderr);
830a0c2
     }
830a0c2
Only in e2tools-0.0.16.fedora: progress.c~
830a0c2
diff -rup e2tools-0.0.16.orig/read.c e2tools-0.0.16.fedora/read.c
830a0c2
--- e2tools-0.0.16.orig/read.c	2002-08-08 09:58:35.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/read.c	2006-07-17 11:52:12.000000000 +0200
830a0c2
@@ -9,9 +9,7 @@
830a0c2
  *
830a0c2
  */
830a0c2
 
830a0c2
-static char rcsid[] = "$Id: e2tools-fedora-fixes.patch,v 1.1 2006/11/01 13:51:56 ixs Exp $";
830a0c2
-
830a0c2
-static char copyright[] = "Copyright 2002 Keith W Sheffield";
830a0c2
+static char __attribute__ ((used)) copyright[] = "Copyright 2002 Keith W Sheffield";
830a0c2
 
830a0c2
 #ifndef READ_C
830a0c2
 #define READ_C
830a0c2
@@ -106,7 +104,6 @@ long
830a0c2
 get_file(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
830a0c2
          char *infile, char *outfile, int keep)
830a0c2
 {
830a0c2
-  int fd;
830a0c2
   ext2_ino_t src;
830a0c2
   int dest;
830a0c2
   int retval;
830a0c2
Only in e2tools-0.0.16.fedora: read.c~
830a0c2
Only in e2tools-0.0.16.fedora: README~
830a0c2
diff -rup e2tools-0.0.16.orig/rm.c e2tools-0.0.16.fedora/rm.c
830a0c2
--- e2tools-0.0.16.orig/rm.c	2004-04-07 04:00:43.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/rm.c	2006-07-21 16:13:25.000000000 +0200
830a0c2
@@ -244,8 +244,8 @@ e2rm(int argc, char *argv[])
830a0c2
                   retval = ext2fs_dir_iterate2(gbl_fs, curr_ino,
830a0c2
                                                DIRENT_FLAG_INCLUDE_EMPTY, 0,
830a0c2
                                                rm_dir_proc,
830a0c2
-                                               (void *)
830a0c2
-                                               (verbose) ? &verbose : NULL);
830a0c2
+                                               (void *) 
830a0c2
+                                               ((verbose) ? &verbose : NULL));
830a0c2
                 }
830a0c2
               else
830a0c2
                 {
830a0c2
Only in e2tools-0.0.16.fedora: rm.c~
830a0c2
diff -rup e2tools-0.0.16.orig/tail.c e2tools-0.0.16.fedora/tail.c
830a0c2
--- e2tools-0.0.16.orig/tail.c	2003-07-12 18:33:11.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/tail.c	2006-07-17 12:39:06.000000000 +0200
830a0c2
@@ -251,7 +251,6 @@ tail(ext2_filsys *fs_ptr, ext2_ino_t roo
830a0c2
   unsigned int bytes_to_read;
830a0c2
   unsigned int bytes_read;
830a0c2
   char *ptr;
830a0c2
-  off_t pos;
830a0c2
   struct ext2_inode inode;
830a0c2
   ext2_file_t tail_fd;    
830a0c2
   ext2_off_t offset;
830a0c2
@@ -320,7 +319,11 @@ tail(ext2_filsys *fs_ptr, ext2_ino_t roo
830a0c2
               if (bytes_to_read != bytes_read - 1)
830a0c2
                 {
830a0c2
                   ptr++;
830a0c2
-                  write(1, ptr, bytes_read - bytes_to_read - 1);
830a0c2
+		  if (0 > write(1, ptr, bytes_read - bytes_to_read - 1))
830a0c2
+		    {
830a0c2
+		      perror("writing bytes to stdout");
830a0c2
+		      return -1;
830a0c2
+		    }
830a0c2
                 }
830a0c2
               offset = 0;       /* make sure we break out of the main loop */
830a0c2
               break;
830a0c2
@@ -338,7 +341,12 @@ tail(ext2_filsys *fs_ptr, ext2_ino_t roo
830a0c2
    */
830a0c2
   
830a0c2
   if (num_lines > 0)
830a0c2
-    write(1, buf, bytes_read);
830a0c2
+    {
830a0c2
+      if (0 > write(1, buf, bytes_read)) {
830a0c2
+	perror("writing bytes to stdout");
830a0c2
+	return -1;
830a0c2
+      }
830a0c2
+    }
830a0c2
     
830a0c2
   /* retreive the current position in the file */
830a0c2
   if ((retval = ext2fs_file_lseek(tail_fd, 0, EXT2_SEEK_CUR, &cur_pos)))
830a0c2
Only in e2tools-0.0.16.fedora: tail.c~
830a0c2
diff -rup e2tools-0.0.16.orig/util.c e2tools-0.0.16.fedora/util.c
830a0c2
--- e2tools-0.0.16.orig/util.c	2002-06-09 23:30:26.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/util.c	2006-07-17 11:45:25.000000000 +0200
830a0c2
@@ -276,10 +276,9 @@ make_regexp(char *shell)
830a0c2
   char *tmpstr;
830a0c2
   char *ptr;
830a0c2
   static regex_t reg;
830a0c2
-  int l;
830a0c2
   char c;
830a0c2
 
830a0c2
-  if (NULL == (tmpstr = alloca((strlen(shell)) << 1 + 3)))
830a0c2
+  if (NULL == (tmpstr = alloca(((strlen(shell)) << 1) + 3)))
830a0c2
     {
830a0c2
       perror("make_regexp");
830a0c2
       return(NULL);
830a0c2
Only in e2tools-0.0.16.fedora: util.c~
830a0c2
diff -rup e2tools-0.0.16.orig/write.c e2tools-0.0.16.fedora/write.c
830a0c2
--- e2tools-0.0.16.orig/write.c	2004-04-07 03:12:30.000000000 +0200
830a0c2
+++ e2tools-0.0.16.fedora/write.c	2006-07-17 11:44:42.000000000 +0200
830a0c2
@@ -9,8 +9,6 @@
830a0c2
  * and modified by Robert Sanders <gt8134b@prism.gatech.edu>
830a0c2
  */
830a0c2
 
830a0c2
-static char rcsid[] = "$Id: e2tools-fedora-fixes.patch,v 1.1 2006/11/01 13:51:56 ixs Exp $";
830a0c2
-
830a0c2
 #ifndef WRITE_C
830a0c2
 #define WRITE_C
830a0c2
 #endif
830a0c2
Only in e2tools-0.0.16.fedora: write.c~