Selaa lähdekoodia

[Pal/{Linux,Linux-SGX}] Remove unused dev_attrcopy()

The static function, dev_attrcopy() in db_devices.c is unused.
Remove it.
Isaku Yamahata 4 vuotta sitten
vanhempi
commit
747226cbe0
2 muutettua tiedostoa jossa 0 lisäystä ja 25 poistoa
  1. 0 14
      Pal/src/host/Linux-SGX/db_devices.c
  2. 0 11
      Pal/src/host/Linux/db_devices.c

+ 0 - 14
Pal/src/host/Linux-SGX/db_devices.c

@@ -83,9 +83,6 @@ static int parse_device_uri(const char ** uri, char ** type, struct handle_ops *
     return 0;
 }
 
-static inline void
-dev_attrcopy (PAL_STREAM_ATTR * attr, struct stat * stat);
-
 static int64_t char_read (PAL_HANDLE handle, uint64_t offset, uint64_t count,
                           void * buffer);
 static int64_t char_write (PAL_HANDLE handle, uint64_t offset, uint64_t count,
@@ -354,17 +351,6 @@ static int dev_flush (PAL_HANDLE handle)
     return 0;
 }
 
-static inline void
-dev_attrcopy (PAL_STREAM_ATTR * attr, struct stat * stat)
-{
-    attr->handle_type = pal_type_dev;
-    /* readable, writable and runnable are decied by euidstataccess */
-    attr->readable = stataccess(stat, ACCESS_R);
-    attr->writable = stataccess(stat, ACCESS_W);
-    attr->runnable = stataccess(stat, ACCESS_X);
-    attr->pending_size = stat->st_size;
-}
-
 /* 'attrquery' operation for device streams */
 static int dev_attrquery (const char * type, const char * uri,
                           PAL_STREAM_ATTR * attr)

+ 0 - 11
Pal/src/host/Linux/db_devices.c

@@ -83,8 +83,6 @@ static int parse_device_uri(const char** uri, char** type, struct handle_ops** o
     return 0;
 }
 
-static inline void dev_attrcopy(PAL_STREAM_ATTR* attr, struct stat* stat);
-
 static int64_t char_read(PAL_HANDLE handle, uint64_t offset, uint64_t count, void* buffer);
 static int64_t char_write(PAL_HANDLE handle, uint64_t offset, uint64_t count, const void* buffer);
 static int term_attrquery(const char* type, const char* uri, PAL_STREAM_ATTR* attr);
@@ -359,15 +357,6 @@ static int dev_flush(PAL_HANDLE handle) {
     return 0;
 }
 
-static inline void dev_attrcopy(PAL_STREAM_ATTR* attr, struct stat* stat) {
-    attr->handle_type = pal_type_dev;
-    /* readable, writable and runnable are decied by euidstataccess */
-    attr->readable     = stataccess(stat, ACCESS_R);
-    attr->writable     = stataccess(stat, ACCESS_W);
-    attr->runnable     = stataccess(stat, ACCESS_X);
-    attr->pending_size = stat->st_size;
-}
-
 /* 'attrquery' operation for device streams */
 static int dev_attrquery(const char* type, const char* uri, PAL_STREAM_ATTR* attr) {
     if (!strcmp_static(type, "dev"))