comparison rvinterf/etmsync/fswrite.c @ 291:69e8ae2b5ba2

fc-fsio: fwrite implementation started
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 01 Mar 2014 02:36:25 +0000
parents 76228aecf0d9
children 3aa03b9519c0
comparison
equal deleted inserted replaced
290:76228aecf0d9 291:69e8ae2b5ba2
96 report_ffs_err("ffs_remove", rvi_msg[3]); 96 report_ffs_err("ffs_remove", rvi_msg[3]);
97 return(ERROR_TARGET); 97 return(ERROR_TARGET);
98 } 98 }
99 return(0); 99 return(0);
100 } 100 }
101
102 fwrite_hex_string(pathname, strarg)
103 char *pathname, *strarg;
104 {
105 fprintf(stderr, "This function is not yet implemented\n");
106 return(ERROR_BUG);
107 }
108
109 fwrite_from_file(pathname, srcfile)
110 char *pathname, *srcfile;
111 {
112 fprintf(stderr, "This function is not yet implemented\n");
113 return(ERROR_BUG);
114 }
115
116 cmd_fwrite(argc, argv)
117 char **argv;
118 {
119 if (!strcmp(argv[2], "ascii"))
120 return do_short_fwrite(argv[1], argv[3], strlen(argv[3]));
121 else if (!strcmp(argv[2], "hex"))
122 return fwrite_hex_string(argv[1], argv[3]);
123 else if (!strcmp(argv[2], "file"))
124 return fwrite_from_file(argv[1], argv[3]);
125 else {
126 fprintf(stderr,
127 "error: middle argument to fwrite cmd must be \"ascii\", \"hex\" or \"file\"\n"
128 );
129 return(ERROR_USAGE);
130 }
131 }