Added the private ioctl calls to get the 64-bit create and modified time.

Most probably these are used by the kernel to identify changes in a shared
library or something like this.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2088 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2002-11-25 23:51:03 +00:00
parent cb0a9fe094
commit 98138634aa
2 changed files with 22 additions and 1 deletions

View File

@ -56,6 +56,9 @@ typedef ino_t vnode_id;
// missing ioctl() call added
#define IOCTL_FILE_UNCACHED_IO 10000
#define IOCTL_CREATE_TIME 10002
#define IOCTL_MODIFIED_TIME 10003
// B_CUR_FS_API_VERSION is 2 for R5, but 3 on Dano, because of the
// added calls for power management - so it's set to 3 here because
@ -258,4 +261,4 @@ extern _IMPEXP_KERNEL int is_vnode_removed(nspace_id nsid, vnode_id vnid);
extern _EXPORT vnode_ops fs_entry;
extern _EXPORT int32 api_version;
#endif
#endif /* _FSPROTO_H */

View File

@ -584,6 +584,24 @@ bfs_ioctl(void *_ns, void *_node, void *_cookie, int cmd, void *buffer, size_t b
inode->Node()->flags |= INODE_NO_CACHE;
return status;
}
case IOCTL_CREATE_TIME:
{
if (inode == NULL || buffer == NULL)
return B_BAD_VALUE;
off_t *creationTime = (off_t *)buffer;
*creationTime = inode->Node()->create_time;
return B_OK;
}
case IOCTL_MODIFIED_TIME:
{
if (inode == NULL || buffer == NULL)
return B_BAD_VALUE;
off_t *modifiedTime = (off_t *)buffer;
*modifiedTime = inode->LastModified();
return B_OK;
}
case BFS_IOCTL_VERSION:
{
uint32 *version = (uint32 *)buffer;