Changeset 39278 in vbox for trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
- Timestamp:
- Nov 11, 2011 5:05:17 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vfs.c
r39270 r39278 526 526 { 527 527 sffs_data_t *sffs = (sffs_data_t *)vfsp->vfs_data; 528 uint64_t x; 529 uint32_t u; 528 sffs_fsinfo_t fsinfo; 530 529 dev32_t d32; 531 530 int error; 532 531 533 532 bzero(sbp, sizeof(*sbp)); 534 error = sfprov_get_ blksize(sffs->sf_handle, &x);533 error = sfprov_get_fsinfo(sffs->sf_handle, &fsinfo); 535 534 if (error != 0) 536 535 return (error); 537 sbp->f_bsize = x; 538 sbp->f_frsize = x; 539 540 error = sfprov_get_blksavail(sffs->sf_handle, &x); 541 if (error != 0) 542 return (error); 543 sbp->f_bfree = x; 544 sbp->f_bavail = x; 545 sbp->f_files = x / 4; /* some kind of reasonable value */ 546 sbp->f_ffree = x / 4; 547 sbp->f_favail = x / 4; 548 549 error = sfprov_get_blksused(sffs->sf_handle, &x); 550 if (error != 0) 551 return (error); 552 sbp->f_blocks = x + sbp->f_bavail; 536 537 sbp->f_bsize = fsinfo.blksize; 538 sbp->f_frsize = fsinfo.blksize; 539 540 sbp->f_bfree = fsinfo.blksavail; 541 sbp->f_bavail = fsinfo.blksavail; 542 sbp->f_files = fsinfo.blksavail / 4; /* some kind of reasonable value */ 543 sbp->f_ffree = fsinfo.blksavail / 4; 544 sbp->f_favail = fsinfo.blksavail / 4; 545 546 sbp->f_blocks = fsinfo.blksused + sbp->f_bavail; 553 547 554 548 (void) cmpldev(&d32, vfsp->vfs_dev); … … 557 551 sbp->f_flag |= ST_NOSUID; 558 552 559 error = sfprov_get_readonly(sffs->sf_handle, &u); 560 if (error != 0) 561 return (error); 562 if (u) 553 if (fsinfo.readonly) 563 554 sbp->f_flag |= ST_RDONLY; 564 555 565 error = sfprov_get_maxnamesize(sffs->sf_handle, &u); 566 if (error != 0) 567 return (error); 568 sbp->f_namemax = u; 556 sbp->f_namemax = fsinfo.maxnamesize; 569 557 return (0); 570 558 }
Note:
See TracChangeset
for help on using the changeset viewer.