int diskutil_ddzero(const char *path, const long long sectors, boolean zero_fill)
{
    char *output = NULL;
    long long count = 1;
    long long seek = sectors - 1;

    if (path) {
        if (zero_fill) {
            count = sectors;
            seek = 0;
        }

        char of_str[MAX_PATH]; snprintf(of_str, sizeof(of_str), "of=%s", path);
        char seek_str[64]; snprintf(seek_str, sizeof(seek_str), "seek=%lld", seek);
        char count_str[64]; snprintf(count_str, sizeof(count_str), "count=%lld", count);
        output = execlp_output(TRUE, helpers_path[ROOTWRAP], helpers_path[DD], "bs=512", "if=/dev/zero", of_str, seek_str, count_str, NULL);
        if (!output) {
            LOGERROR("cannot create disk file %s\n", path);
            return (EUCA_ERROR);
        }

        EUCA_FREE(output);
        return (EUCA_OK);
    }

    LOGWARN("bad params: path=%s\n", SP(path));
    return (EUCA_INVALID_ERROR);
}
int diskutil_ddzero(const char *path, const long long sectors, boolean zero_fill)
{
    char *output = NULL;
    long long count = 1;
    long long seek = sectors - 1;

    if (path) {
        if (zero_fill) {
            count = sectors;
            seek = 0;
        }

        char of_str[MAX_PATH]; snprintf(of_str, sizeof(of_str), "of=%s", path);
        char seek_str[64]; snprintf(seek_str, sizeof(seek_str), "seek=%lld", seek);
        char count_str[64]; snprintf(count_str, sizeof(count_str), "count=%lld", count);
        output = execlp_output(TRUE, helpers_path[ROOTWRAP], helpers_path[DD], "bs=512", "if=/dev/zero", of_str, seek_str, count_str, NULL);
        if (!output) {
            LOGERROR("cannot create disk file %s\n", path);
            return (EUCA_ERROR);
        }

        EUCA_FREE(output);
        return (EUCA_OK);
    }

    LOGWARN("bad params: path=%s\n", SP(path));
    return (EUCA_INVALID_ERROR);
}