summaryrefslogtreecommitdiffstats
path: root/c/src
diff options
context:
space:
mode:
Diffstat (limited to 'c/src')
-rw-r--r--c/src/exec/libfs/ChangeLog5
-rw-r--r--c/src/exec/libfs/src/imfs/imfs_load_tar.c96
-rw-r--r--c/src/libfs/ChangeLog5
-rw-r--r--c/src/libfs/src/imfs/imfs_load_tar.c96
4 files changed, 106 insertions, 96 deletions
diff --git a/c/src/exec/libfs/ChangeLog b/c/src/exec/libfs/ChangeLog
index e8b7d42d46..361d8702bf 100644
--- a/c/src/exec/libfs/ChangeLog
+++ b/c/src/exec/libfs/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-16 Chris Johns <ccj@acm.org>
+
+ * imfs/imfs_load_tar.c: Changed the code around to remove an
+ internal compiler error on the Coldfire target.
+
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* .cvsignore: Add autom4te.cache for autoconf > 2.52.
diff --git a/c/src/exec/libfs/src/imfs/imfs_load_tar.c b/c/src/exec/libfs/src/imfs/imfs_load_tar.c
index c8697724f2..b74ff884ea 100644
--- a/c/src/exec/libfs/src/imfs/imfs_load_tar.c
+++ b/c/src/exec/libfs/src/imfs/imfs_load_tar.c
@@ -65,54 +65,8 @@
#define MIN(a,b) ((a)>(b)?(b):(a))
-
-/**************************************************************************
- * This converts octal ASCII number representations into an
- * unsigned long. Only support 32-bit numbers for now.
- *************************************************************************/
-static unsigned long
-octal2ulong(char *octascii, int len)
-{
- int i;
- unsigned long num;
- unsigned long mult;
-
- num = 0;
- mult = 1;
- for (i=len-1; i>=0; i--)
- {
- if ((octascii[i] < '0') || (octascii[i] > '9'))
- continue;
-
- num += mult*((unsigned long)(octascii[i] - '0'));
- mult *= 8;
- }
- return(num);
-}
-
-
-/************************************************************************
- * Compute the TAR checksum and check with the value in
- * the archive. The checksum is computed over the entire
- * header, but the checksum field is substituted with blanks.
- ************************************************************************/
-static int
-compute_tar_header_checksum(char *bufr)
-{
- int i, sum;
-
-
- sum = 0;
- for (i=0; i<512; i++)
- {
- if ((i >= 148) && (i < 156))
- sum += 0xff & ' ';
- else
- sum += 0xff & bufr[i];
- }
- return(sum);
-}
-
+static unsigned long octal2ulong(char *octascii, int len);
+static int compute_tar_header_checksum(char *bufr);
/**************************************************************************
* rtems_tarfs_load
@@ -251,3 +205,49 @@ rtems_tarfs_load(char *mountpoint,
return(status);
}
+/**************************************************************************
+ * This converts octal ASCII number representations into an
+ * unsigned long. Only support 32-bit numbers for now.
+ *************************************************************************/
+static unsigned long
+octal2ulong(char *octascii, int len)
+{
+ int i;
+ unsigned long num;
+ unsigned long mult;
+
+ num = 0;
+ mult = 1;
+ for (i=len-1; i>=0; i--)
+ {
+ if ((octascii[i] < '0') || (octascii[i] > '9'))
+ continue;
+
+ num += mult*((unsigned long)(octascii[i] - '0'));
+ mult *= 8;
+ }
+ return(num);
+}
+
+
+/************************************************************************
+ * Compute the TAR checksum and check with the value in
+ * the archive. The checksum is computed over the entire
+ * header, but the checksum field is substituted with blanks.
+ ************************************************************************/
+static int
+compute_tar_header_checksum(char *bufr)
+{
+ int i, sum;
+
+
+ sum = 0;
+ for (i=0; i<512; i++)
+ {
+ if ((i >= 148) && (i < 156))
+ sum += 0xff & ' ';
+ else
+ sum += 0xff & bufr[i];
+ }
+ return(sum);
+}
diff --git a/c/src/libfs/ChangeLog b/c/src/libfs/ChangeLog
index e8b7d42d46..361d8702bf 100644
--- a/c/src/libfs/ChangeLog
+++ b/c/src/libfs/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-16 Chris Johns <ccj@acm.org>
+
+ * imfs/imfs_load_tar.c: Changed the code around to remove an
+ internal compiler error on the Coldfire target.
+
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* .cvsignore: Add autom4te.cache for autoconf > 2.52.
diff --git a/c/src/libfs/src/imfs/imfs_load_tar.c b/c/src/libfs/src/imfs/imfs_load_tar.c
index c8697724f2..b74ff884ea 100644
--- a/c/src/libfs/src/imfs/imfs_load_tar.c
+++ b/c/src/libfs/src/imfs/imfs_load_tar.c
@@ -65,54 +65,8 @@
#define MIN(a,b) ((a)>(b)?(b):(a))
-
-/**************************************************************************
- * This converts octal ASCII number representations into an
- * unsigned long. Only support 32-bit numbers for now.
- *************************************************************************/
-static unsigned long
-octal2ulong(char *octascii, int len)
-{
- int i;
- unsigned long num;
- unsigned long mult;
-
- num = 0;
- mult = 1;
- for (i=len-1; i>=0; i--)
- {
- if ((octascii[i] < '0') || (octascii[i] > '9'))
- continue;
-
- num += mult*((unsigned long)(octascii[i] - '0'));
- mult *= 8;
- }
- return(num);
-}
-
-
-/************************************************************************
- * Compute the TAR checksum and check with the value in
- * the archive. The checksum is computed over the entire
- * header, but the checksum field is substituted with blanks.
- ************************************************************************/
-static int
-compute_tar_header_checksum(char *bufr)
-{
- int i, sum;
-
-
- sum = 0;
- for (i=0; i<512; i++)
- {
- if ((i >= 148) && (i < 156))
- sum += 0xff & ' ';
- else
- sum += 0xff & bufr[i];
- }
- return(sum);
-}
-
+static unsigned long octal2ulong(char *octascii, int len);
+static int compute_tar_header_checksum(char *bufr);
/**************************************************************************
* rtems_tarfs_load
@@ -251,3 +205,49 @@ rtems_tarfs_load(char *mountpoint,
return(status);
}
+/**************************************************************************
+ * This converts octal ASCII number representations into an
+ * unsigned long. Only support 32-bit numbers for now.
+ *************************************************************************/
+static unsigned long
+octal2ulong(char *octascii, int len)
+{
+ int i;
+ unsigned long num;
+ unsigned long mult;
+
+ num = 0;
+ mult = 1;
+ for (i=len-1; i>=0; i--)
+ {
+ if ((octascii[i] < '0') || (octascii[i] > '9'))
+ continue;
+
+ num += mult*((unsigned long)(octascii[i] - '0'));
+ mult *= 8;
+ }
+ return(num);
+}
+
+
+/************************************************************************
+ * Compute the TAR checksum and check with the value in
+ * the archive. The checksum is computed over the entire
+ * header, but the checksum field is substituted with blanks.
+ ************************************************************************/
+static int
+compute_tar_header_checksum(char *bufr)
+{
+ int i, sum;
+
+
+ sum = 0;
+ for (i=0; i<512; i++)
+ {
+ if ((i >= 148) && (i < 156))
+ sum += 0xff & ' ';
+ else
+ sum += 0xff & bufr[i];
+ }
+ return(sum);
+}