return -1;
}
-#if 0
- if (fs_m_in.m_type != REQ_READSUPER_O && fs_m_in.m_type != REQ_READSUPER_S) {
- printf("ISO9660FS(%d): Invalid login reply\n", SELF_E);
- return -1;
- } else {
- if (fs_m_in.m_type == REQ_READSUPER_S)
- fs_m_out.m_type = fs_readsuper_s();
- else
- fs_m_out.m_type = fs_readsuper();
- reply(FS_PROC_NR, &fs_m_out);
- if (fs_m_out.m_type != OK) return -1;
- }
-#endif
-
for (;;) {
/* Wait for request message. */
ind= req_nr-VFS_BASE;
if (ind < 0 || ind >= NREQS) {
- printf("iso9660fs: bad request %d\n", req_nr);
- printf("ind = %d\n", ind);
error = EINVAL;
}
else
fs_m_out.m_type = error;
reply(who_e, &fs_m_out); /* returns the response to VFS */
-
}
}
dir_tmp = get_free_dir_record();
create_dir_record(dir_tmp,bp->b_data + block_pos,
block*block_size + block_pos);
-
if (dir_tmp->length == 0) { /* EOF. I exit and return 0s */
block_pos = block_size;
done = TRUE;
if (tmpbuf_offset + reclen > GETDENTS_BUFSIZ) {
r= sys_safecopyto(FS_PROC_NR, gid, userbuf_off,
(vir_bytes)getdents_buf, tmpbuf_offset, D);
-
if (r != OK)
panic(__FILE__,"fs_getdents: sys_safecopyto failed\n",r);
block++; /* read the next one */
}
-
if (tmpbuf_offset != 0) {
r= sys_safecopyto(FS_PROC_NR, gid, userbuf_off,
(vir_bytes)getdents_buf, tmpbuf_offset, D);
r= ENOSYS;
fs_m_out.RES_GDE_POS_CHANGE= 0; /* No change in case of an error */
- r= userbuf_off;
+ /* r= userbuf_off;*/
+ fs_m_out.RES_GDE_CUM_IO = userbuf_off;
if (cur_pos >= pos)
fs_m_out.RES_GDE_POS_CHANGE= cur_pos-pos;
+ else
+ fs_m_out.RES_GDE_POS_CHANGE= 0;
release_dir_record(dir); /* release the inode */
+ r= OK;
+ return(r);
+}
+
+/*===========================================================================*
+ * fs_getdents_s *
+ *===========================================================================*/
+PUBLIC int fs_getdents_o(void)
+{
+ int r;
+ r = fs_getdents();
+
+ if(r == OK)
+ r = fs_m_out.RES_GDE_CUM_IO;
return(r);
}
fs_new_driver, /* 37 */
fs_bread, /* 38 */
no_sys, /* 39 */
- fs_getdents, /* 40 */
+ fs_getdents_o, /* 40 */
no_sys, /* 41: not_used */
fs_read_s, /* 42 */
no_sys, /* 43: not used */
fs_mountpoint_s, /* 50 */
fs_readsuper_s, /* 51 */
no_sys, /* 52: not used */
+ no_sys, /* 53 */
+ fs_getdents, /* 54 */
};