changeset 233:e434df27e4d9

fc-fsio format command: don't stop scripts on NOPREFORMAT error, i.e., if the FFS is already formatted
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 12 Aug 2017 17:31:50 +0000
parents 353218c38996
children 4cee70d429bf
files rvinterf/etmsync/fsmisc.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/etmsync/fsmisc.c	Fri Aug 04 08:06:36 2017 +0000
+++ b/rvinterf/etmsync/fsmisc.c	Sat Aug 12 17:31:50 2017 +0000
@@ -10,6 +10,7 @@
 #include <strings.h>
 #include "etm.h"
 #include "ffs.h"
+#include "ffserr.h"
 #include "tmffs2.h"
 #include "limits.h"
 #include "ffslimits.h"
@@ -49,7 +50,10 @@
 	}
 	if (rvi_msg[3]) {
 		report_ffs_err("format", rvi_msg[3]);
-		return(ERROR_TARGET);
+		if (rvi_msg[3] == TMFFS_ERR_NOPREFORMAT)
+			return(0);	/* do not stop scripts */
+		else
+			return(ERROR_TARGET);
 	}
 	return(0);
 }