Changeset 39249 in vbox for trunk/src/VBox/Additions/solaris/SharedFolders
- Timestamp:
- Nov 9, 2011 12:52:14 PM (13 years ago)
- Location:
- trunk/src/VBox/Additions/solaris/SharedFolders
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_prov.c
r38843 r39249 878 878 uint32_t nents; 879 879 uint32_t size; 880 uint32_t cnt;880 off_t offset; 881 881 sffs_dirents_t *cur_buf; 882 882 sffs_stats_t *cur_stats; … … 937 937 } 938 938 939 cnt = 0;939 offset = 0; 940 940 for (;;) { 941 941 numbytes = infobuff_alloc; … … 989 989 dirent = (dirent64_t *) 990 990 (((char *) &cur_buf->sf_entries[0]) + cur_buf->sf_len); 991 str cpy(&dirent->d_name[0], info->name.String.utf8);991 strncpy(&dirent->d_name[0], info->name.String.utf8, DIRENT64_NAMELEN(reclen)); 992 992 dirent->d_reclen = reclen; 993 dirent->d_off = cnt; 993 offset += reclen; 994 dirent->d_off = offset; 994 995 995 996 cur_buf->sf_len += reclen; 996 ++cnt;997 997 998 998 /* save the stats */ -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
r39113 r39249 356 356 ddi_strtol(optval, NULL, 10, &val) == 0 && 357 357 (int)val == val) 358 { 358 359 stat_ttl = val; 360 } 361 else 362 vfs_setmntopt(vfsp, "stat_ttl", VBOXSOLQUOTE(DEF_STAT_TTL_MS), 0); 359 363 360 364 /* -
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c
r39218 r39249 313 313 sfnode_clear_dir_list(parent); 314 314 if (parent->sf_children == 0) 315 panic("sfnode_destroy (%s) parent has no child", node->sf_path);315 panic("sfnode_destroy parent (%s) has no child", parent->sf_path); 316 316 --parent->sf_children; 317 317 if (parent->sf_children == 0 && … … 2138 2138 if (*no < 0 || *no > MAXOFFSET_T) 2139 2139 return (EINVAL); 2140 2141 if (v->v_type == VDIR) 2142 { 2143 sffs_dirents_t *cur_buf = VN2SFN(v)->sf_dir_list; 2144 off_t offset = 0; 2145 2146 if (cur_buf == NULL) 2147 return (0); 2148 2149 while (cur_buf != NULL) { 2150 if (*no >= offset && *no <= offset + cur_buf->sf_len) 2151 return (0); 2152 offset += cur_buf->sf_len; 2153 cur_buf = cur_buf->sf_next; 2154 } 2155 return (EINVAL); 2156 } 2140 2157 return (0); 2141 2158 }
Note:
See TracChangeset
for help on using the changeset viewer.