ChangeLog, error_message.c, error_table.h, et_name.c:
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.
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index ad0d3e4..e8b3e0a 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -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
diff --git a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c
index c40a442..57390ee 100644
--- a/e2fsck/e2fsck.c
+++ b/e2fsck/e2fsck.c
@@ -196,7 +196,9 @@
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
diff --git a/lib/et/ChangeLog b/lib/et/ChangeLog
index 78db182..b7c9e06 100644
--- a/lib/et/ChangeLog
+++ b/lib/et/ChangeLog
@@ -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
diff --git a/lib/et/error_message.c b/lib/et/error_message.c
index c6c2b39..88ce15b 100644
--- a/lib/et/error_message.c
+++ b/lib/et/error_message.c
@@ -31,11 +31,11 @@
{
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
diff --git a/lib/et/error_table.h b/lib/et/error_table.h
index 31971f0..ea79e72 100644
--- a/lib/et/error_table.h
+++ b/lib/et/error_table.h
@@ -26,7 +26,7 @@
#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
diff --git a/lib/et/et_name.c b/lib/et/et_name.c
index db4099f..cf3cd5c 100644
--- a/lib/et/et_name.c
+++ b/lib/et/et_name.c
@@ -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 char buf[6];
const char * error_table_name(num)
- int num;
+ errcode_t num;
{
int ch;
int i;
@@ -24,10 +25,10 @@
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];
}