return ioctl(fd, BLKDISCARD, range);
}
+bool block_device_is_rotational(const char *devname)
+{
+ return get_block_device_int_property(devname, "rotational") > 0;
+}
+
int get_device_by_uuid(uuid_d dev_uuid, const char* label, char* partition,
char* device)
{
return -EOPNOTSUPP;
}
+bool block_device_is_rotational(const char *devname)
+{
+ return false;
+}
+
int get_device_by_uuid(uuid_d dev_uuid, const char* label, char* partition,
char* device)
{
return -EOPNOTSUPP;
}
+bool block_device_is_rotational(const char *devname)
+{
+ return false;
+}
+
int get_device_by_uuid(uuid_d dev_uuid, const char* label, char* partition,
char* device)
{
return -EOPNOTSUPP;
}
+bool block_device_is_rotational(const char *devname)
+{
+ return false;
+}
+
int get_device_by_uuid(uuid_d dev_uuid, const char* label, char* partition,
char* device)
{
extern int get_block_device_size(int fd, int64_t *psize);
extern int64_t get_block_device_int_property(const char *devname, const char *property);
extern bool block_device_support_discard(const char *devname);
+extern bool block_device_is_rotational(const char *devname);
extern int block_device_discard(int fd, int64_t offset, int64_t len);
extern int get_device_by_uuid(uuid_d dev_uuid, const char* label,
char* partition, char* device);