int diskutil_umount(const char *dev)
{
    char *output = NULL;

    if (dev) {
        sem_p(loop_sem);
        {
            output = pruntf(TRUE, "%s %s umount %s", helpers_path[ROOTWRAP], helpers_path[MOUNTWRAP], dev);
        }
        sem_v(loop_sem);

        if (!output) {
            LOGERROR("cannot unmount device '%s'\n", dev);
            return (EUCA_ERROR);
        }

        EUCA_FREE(output);
        return (EUCA_OK);
    }

    LOGERROR("cannot unmount device '%s'\n", SP(dev));
    return (EUCA_INVALID_ERROR);
}
int diskutil_umount(const char *dev)
{
    char *output = NULL;

    if (dev) {
        sem_p(loop_sem);
        {
            output = pruntf(TRUE, "%s %s umount %s", helpers_path[ROOTWRAP], helpers_path[MOUNTWRAP], dev);
        }
        sem_v(loop_sem);

        if (!output) {
            LOGERROR("cannot unmount device '%s'\n", dev);
            return (EUCA_ERROR);
        }

        EUCA_FREE(output);
        return (EUCA_OK);
    }

    LOGERROR("cannot unmount device '%s'\n", SP(dev));
    return (EUCA_INVALID_ERROR);
}