Page MenuHomeFreeBSD

D40199.1794140464.diff
No OneTemporary

Authored By
Unknown
Size
934 B
Referenced Files
None
Subscribers
None

D40199.1794140464.diff

diff --git a/usr.sbin/bsdinstall/partedit/partedit.c b/usr.sbin/bsdinstall/partedit/partedit.c
--- a/usr.sbin/bsdinstall/partedit/partedit.c
+++ b/usr.sbin/bsdinstall/partedit/partedit.c
@@ -428,14 +428,17 @@
free(tobesorted);
}
- if (getenv("PATH_FSTAB") != NULL)
- fstab_path = getenv("PATH_FSTAB");
- else
+ fstab_path = getenv("PATH_FSTAB");
+ if (fstab_path == NULL)
fstab_path = "/etc/fstab";
fstab = fopen(fstab_path, "w+");
if (fstab == NULL) {
- sprintf(message, "Cannot open fstab file %s for writing (%s)\n",
- getenv("PATH_FSTAB"), strerror(errno));
+ error = snprintf(message, sizeof(message), "Cannot open fstab file %s"
+ " for writing (%s)\n", fstab_path, strerror(errno));
+ if (error < 0) {
+ snprintf(message, sizeof(message), "Cannot open fstab file for"
+ " writing (%s)\n", strerror(errno));
+ }
conf.title = "Error";
bsddialog_msgbox(&conf, message, 0, 0);
return (-1);

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 8, 12:21 PM (8 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41585273
Default Alt Text
D40199.1794140464.diff (934 B)

Event Timeline