(1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \
(1ULL << VHOST_USER_F_PROTOCOL_FEATURES))
+struct vhost_blk_ctrlr *g_vhost_ctrlr;
+
/* Path to folder where character device will be created. Can be set by user. */
static char dev_pathname[PATH_MAX] = "";
static sem_t exit_sem;
}
snprintf(dev_pathname, sizeof(dev_pathname), "%s/%s", path, ctrlr_name);
- if (access(dev_pathname, F_OK) != -1) {
- if (unlink(dev_pathname) != 0)
- rte_exit(EXIT_FAILURE, "Cannot remove %s.\n",
- dev_pathname);
- }
+ unlink(dev_pathname);
if (rte_vhost_driver_register(dev_pathname, 0) != 0) {
fprintf(stderr, "socket %s already exists\n", dev_pathname);
{
struct vhost_blk_ctrlr *ctrlr;
- if (access(dev_pathname, F_OK) == 0)
- unlink(dev_pathname);
+ unlink(dev_pathname);
if (g_should_stop != -1) {
g_should_stop = 1;