- path_len = strlen(root_disk_path);
- path_bufsz = min(32790, PATH_MAX + 1);
-
- if (path_len >= path_bufsz)
- return WIMLIB_ERR_INVALID_PARAM;
-
- path_buf = MALLOC(path_bufsz);
- if (!path_buf)
- return WIMLIB_ERR_NOMEM;
- memcpy(path_buf, root_disk_path, path_len + 1);
-
- params->capture_root_nchars = path_len;