annotate rvinterf/etmsync/fsread.c @ 285:bb28ba9e82c5

fc-fsio: file read primitive and hd command implemented
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Fri, 28 Feb 2014 06:16:02 +0000
parents 7b4d4e3e610a
children 211b35db427c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * Commands for reading the content of a GSM device's file system
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 */
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 #include <sys/types.h>
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 #include <stdio.h>
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 #include <stdlib.h>
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 #include <string.h>
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 #include <strings.h>
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #include "etm.h"
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 #include "ffs.h"
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 #include "tmffs2.h"
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 #include "limits.h"
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 #include "localtypes.h"
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #include "localstruct.h"
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 #include "exitcodes.h"
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 void
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 ll_print_line(pathname, stat)
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 char *pathname;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 struct stat_info *stat;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 {
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 char readonly;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 if (stat->flags & OF_READONLY)
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 readonly = 'r';
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 else
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 readonly = ' ';
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 switch (stat->type) {
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 case OT_FILE:
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 printf("f%c %7u %s\n", readonly, stat->size, pathname);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 return;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 case OT_DIR:
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 printf("d%c %s\n", readonly, pathname);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 return;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 case OT_LINK:
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 printf("l%c %s\n", readonly, pathname);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 return;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 default:
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 printf("?%c %s\n", readonly, pathname);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 }
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 }
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 void
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 mk_ffs_child_path_from_readdir(dirpath, rdname, buf)
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 char *dirpath, *rdname, *buf;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 {
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 char *tailp;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 tailp = index(dirpath, '\0') - 1;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 if (*tailp == '/')
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 sprintf(buf, "%s%s", dirpath, rdname);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 else
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 sprintf(buf, "%s/%s", dirpath, rdname);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 }
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 cmd_ll(argc, argv)
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 char **argv;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 {
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 struct stat_info stat;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 u_char rdstate[4];
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 char rdbuf[TMFFS_STRING_SIZE], childpath[TMFFS_STRING_SIZE*2];
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 int nument, i, rc;
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 rc = do_xlstat(argv[1], &stat);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 if (rc)
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 return(rc);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 if (stat.type != OT_DIR) {
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 ll_print_line(argv[1], &stat);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 return(0);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 }
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 rc = do_opendir(argv[1], rdstate, &nument);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 if (rc)
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 return(rc);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 if (!nument) {
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 printf("<empty dir>\n");
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 return(0);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 }
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 for (i = 0; i < nument; i++) {
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 rc = do_readdir(rdstate, rdbuf);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 if (rc)
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 return(rc);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 mk_ffs_child_path_from_readdir(argv[1], rdbuf, childpath);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 rc = do_xlstat(childpath, &stat);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 if (rc) {
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 printf("xlstat failed on %s\n", childpath);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 return(rc);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 }
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 ll_print_line(childpath, &stat);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 }
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 return(0);
88eed3327682 fc-fsio: ll command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 }
284
7b4d4e3e610a fc-fsio: functions written for file descriptor open/read/close
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 283
diff changeset
93
285
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
94 void
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
95 hexdump_line(offset, buf, len)
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
96 u_char *buf;
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
97 {
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
98 int i, c;
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
99
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
100 printf("%02X: ", offset);
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
101 for (i = 0; i < 16; i++) {
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
102 if (i < len)
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
103 printf("%02X ", buf[i]);
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
104 else
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
105 fputs(" ", stdout);
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
106 if (i == 7 || i == 15)
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
107 putchar(' ');
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
108 }
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
109 for (i = 0; i < len; i++) {
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
110 c = buf[i];
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
111 if (c < ' ' || c > '~')
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
112 c = '.';
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
113 putchar(c);
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
114 }
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
115 putchar('\n');
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
116 }
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
117
284
7b4d4e3e610a fc-fsio: functions written for file descriptor open/read/close
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 283
diff changeset
118 cmd_hd(argc, argv)
7b4d4e3e610a fc-fsio: functions written for file descriptor open/read/close
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 283
diff changeset
119 char **argv;
7b4d4e3e610a fc-fsio: functions written for file descriptor open/read/close
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 283
diff changeset
120 {
285
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
121 u_char databuf[MAX_READ_DATA];
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
122 int rc, sz, off, l;
284
7b4d4e3e610a fc-fsio: functions written for file descriptor open/read/close
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 283
diff changeset
123
285
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
124 rc = do_file_read(argv[1], databuf, MAX_READ_DATA, &sz);
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
125 if (rc)
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
126 return(rc);
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
127 printf("%d bytes read\n", sz);
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
128 for (off = 0; off < sz; off += 16) {
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
129 l = sz - off;
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
130 if (l > 16)
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
131 l = 16;
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
132 hexdump_line(off, databuf + off, l);
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
133 }
bb28ba9e82c5 fc-fsio: file read primitive and hd command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 284
diff changeset
134 return(0);
284
7b4d4e3e610a fc-fsio: functions written for file descriptor open/read/close
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 283
diff changeset
135 }