Fix regression in bsdinstall post r356740 - partedit errno(2) 21 EISDIR
This resulted in the partitioning step failing if either of the "Auto (UFS)" or "Manual" options were selected. Reason: partedit was attempting to open a directory (TMPDIR) read/write, which resulted in errno(2) 21 - EISDIR - Is a directory. Reported by: Clay Daniels <clay.daniels.jr@gmail.com> Reviewed by: Ryan Moeller <ryan@freqlabs.com> Approved by: emaste, bcran Differential Revision: https://reviews.freebsd.org/D23232
This commit is contained in:
@@ -93,7 +93,7 @@ main(int argc, const char **argv)
|
||||
tmpdir = getenv("TMPDIR");
|
||||
if (tmpdir == NULL)
|
||||
tmpdir = "/tmp";
|
||||
tmpdfd = open(tmpdir, O_RDWR | O_DIRECTORY);
|
||||
tmpdfd = open(tmpdir, O_DIRECTORY);
|
||||
if (tmpdfd < 0)
|
||||
err(EX_OSERR, "%s", tmpdir);
|
||||
unlinkat(tmpdfd, "bsdinstall-esps", 0);
|
||||
|
||||
Reference in New Issue
Block a user