Whamcloud - gitweb
ChangeLog, error_message.c, error_table.h, et_name.c:
authorTheodore Ts'o <tytso@mit.edu>
Sun, 10 Aug 1997 23:02:21 +0000 (23:02 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 10 Aug 1997 23:02:21 +0000 (23:02 +0000)
  error_table.h:
  et_name.c (error_table_name):
  error_message.c (error_message.c): Make code be 16-bit safe.
ChangeLog, e2fsck.c:
  e2fsck.c (check_mount): Add stronger warning message about the perils
   of running e2fsck on a mounted filesystem.

e2fsck/ChangeLog
e2fsck/e2fsck.c
lib/et/ChangeLog
lib/et/error_message.c
lib/et/error_table.h
lib/et/et_name.c

index ad0d3e4..e8b3e0a 100644 (file)
@@ -1,3 +1,8 @@
+Sun Aug 10 18:58:02 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * e2fsck.c (check_mount): Add stronger warning message about the
+               perils of running e2fsck on a mounted filesystem.
+
 Tue Jun 17 01:33:20 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * Release of E2fsprogs 1.11
index c40a442..57390ee 100644 (file)
@@ -196,7 +196,9 @@ static void check_mount(NOARGS)
                return;
        }
 
-       printf ("%s is mounted.  ", device_name);
+       printf("%s is mounted.\n\n", device_name);
+       printf("\a\a\a\aWARNING!!!  Running e2fsck on a mounted filesystem "
+              "may cause\nSEVERE filesystem damage.\a\a\a\n\n");
        if (isatty (0) && isatty (1))
                cont = ask_yn("Do you really want to continue", -1);
        else
index 78db182..b7c9e06 100644 (file)
@@ -1,3 +1,9 @@
+Sun Aug 10 09:40:54 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * error_table.h:
+       * et_name.c (error_table_name): 
+       * error_message.c (error_message.c): Make code be 16-bit safe.
+
 Tue Jun 17 01:33:20 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * Release of E2fsprogs 1.11
index c6c2b39..88ce15b 100644 (file)
@@ -31,11 +31,11 @@ const char * error_message (code)
 {
     int offset;
     struct et_list *et;
-    int table_num;
+    errcode_t table_num;
     int started = 0;
     char *cp;
 
-    offset = code & ((1<<ERRCODE_RANGE)-1);
+    offset = (int) (code & ((1<<ERRCODE_RANGE)-1));
     table_num = code - offset;
     if (!table_num) {
 #ifdef HAS_SYS_ERRLIST
index 31971f0..ea79e72 100644 (file)
@@ -26,7 +26,7 @@ extern struct et_list * _et_list;
 #define        BITS_PER_CHAR   6       /* # bits to shift per character in name */
 
 #ifdef __STDC__
-extern const char *error_table_name(int num);
+extern const char *error_table_name(errcode_t num);
 #else
 extern const char *error_table_name();
 #endif
index db4099f..cf3cd5c 100644 (file)
@@ -4,6 +4,7 @@
  * For copyright info, see mit-sipb-copyright.h.
  */
 
+#include "com_err.h"
 #include "error_table.h"
 #include "mit-sipb-copyright.h"
 #include "internal.h"
@@ -14,7 +15,7 @@ static const char char_set[] =
 static char buf[6];
 
 const char * error_table_name(num)
-    int num;
+    errcode_t num;
 {
     int ch;
     int i;
@@ -24,10 +25,10 @@ const char * error_table_name(num)
     p = buf;
     num >>= ERRCODE_RANGE;
     /* num = ?? ??? ??? aaa aaa bbb bbb ccc ccc ddd ddd */
-    num &= 077777777;
+    num &= 077777777L;
     /* num = 00 000 000 aaa aaa bbb bbb ccc ccc ddd ddd */
     for (i = 4; i >= 0; i--) {
-       ch = (num >> BITS_PER_CHAR * i) & ((1 << BITS_PER_CHAR) - 1);
+       ch = (int)((num >> BITS_PER_CHAR * i) & ((1 << BITS_PER_CHAR) - 1));
        if (ch != 0)
            *p++ = char_set[ch-1];
     }