* fhandler.h (class fhandler_dev_raw): Add method fstat.
* fhandler_raw.cc (fhandler_dev_raw::fstat): New method. Add missing ChangeLog for previous patch.
This commit is contained in:
parent
7f7eda0780
commit
a4b25e31ca
|
@ -1,3 +1,18 @@
|
|||
2003-09-30 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.h (class fhandler_dev_raw): Add method fstat.
|
||||
* fhandler_raw.cc (fhandler_dev_raw::fstat): New method.
|
||||
|
||||
2003-09-30 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* devices.h (enum fh_devices): Remove DEV_RAWDRIVE_MAJOR and
|
||||
FH_RAWDRIVE.
|
||||
* devices.shilka (dev_rawdrive_storage): Remove.
|
||||
(unit_devices): Remove pointer to dev_rawdrive_storage.
|
||||
(uniq_devices): Remove rawdrive entry.
|
||||
* dtable.cc (build_fh_pc): Remove DEV_RAWDRIVE_MAJOR case.
|
||||
* path.cc (win32_device_name): ditto.
|
||||
|
||||
2003-09-29 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* syslog.cc (vsyslog): Print debug message if ReportEventA fails.
|
||||
|
|
|
@ -527,6 +527,8 @@ class fhandler_dev_raw: public fhandler_base
|
|||
void raw_read (void *ptr, size_t& ulen);
|
||||
int raw_write (const void *ptr, size_t ulen);
|
||||
|
||||
int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2)));
|
||||
|
||||
int dup (fhandler_base *child);
|
||||
|
||||
int ioctl (unsigned int cmd, void *buf);
|
||||
|
|
|
@ -129,6 +129,31 @@ fhandler_dev_raw::~fhandler_dev_raw (void)
|
|||
clear ();
|
||||
}
|
||||
|
||||
int __stdcall
|
||||
fhandler_dev_raw::fstat (struct __stat64 *buf)
|
||||
{
|
||||
debug_printf ("here");
|
||||
|
||||
switch (get_device ())
|
||||
{
|
||||
case FH_TAPE:
|
||||
case FH_NTAPE:
|
||||
buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
|
||||
break;
|
||||
default:
|
||||
buf->st_mode = S_IFBLK | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH;
|
||||
break;
|
||||
}
|
||||
|
||||
buf->st_uid = geteuid32 ();
|
||||
buf->st_gid = getegid32 ();
|
||||
buf->st_nlink = 1;
|
||||
buf->st_blksize = S_BLKSIZE;
|
||||
time_as_timestruc_t (&buf->st_ctim);
|
||||
buf->st_atim = buf->st_mtim = buf->st_ctim;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
fhandler_dev_raw::open (int flags, mode_t)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue