Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171614956
D6094.id15615.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6094.id15615.diff
View Options
Index: head/usr.sbin/bsdinstall/partedit/partedit.c
===================================================================
--- head/usr.sbin/bsdinstall/partedit/partedit.c
+++ head/usr.sbin/bsdinstall/partedit/partedit.c
@@ -27,15 +27,15 @@
*/
#include <sys/param.h>
-#include <libgen.h>
-#include <libutil.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <fstab.h>
-#include <libgeom.h>
#include <dialog.h>
#include <dlg_keys.h>
+#include <errno.h>
+#include <fstab.h>
+#include <inttypes.h>
+#include <libgeom.h>
+#include <libutil.h>
+#include <stdlib.h>
#include "diskeditor.h"
#include "partedit.h"
@@ -71,13 +71,14 @@
main(int argc, const char **argv)
{
struct partition_metadata *md;
- const char *prompt;
+ const char *progname, *prompt;
struct partedit_item *items = NULL;
struct gmesh mesh;
int i, op, nitems, nscroll;
int error;
- if (strcmp(basename(argv[0]), "sade") == 0)
+ progname = getprogname();
+ if (strcmp(progname, "sade") == 0)
sade_mode = 1;
TAILQ_INIT(&part_metadata);
@@ -93,7 +94,7 @@
/* Revert changes on SIGINT */
signal(SIGINT, sigint_handler);
- if (strcmp(basename(argv[0]), "autopart") == 0) { /* Guided */
+ if (strcmp(progname, "autopart") == 0) { /* Guided */
prompt = "Please review the disk setup. When complete, press "
"the Finish button.";
/* Experimental ZFS autopartition support */
@@ -102,7 +103,7 @@
} else {
part_wizard("ufs");
}
- } else if (strcmp(basename(argv[0]), "scriptedpart") == 0) {
+ } else if (strcmp(progname, "scriptedpart") == 0) {
error = scripted_editor(argc, argv);
prompt = NULL;
if (error != 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 13, 4:46 AM (6 m, 37 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38833992
Default Alt Text
D6094.id15615.diff (1 KB)
Attached To
Mode
D6094: Remove unportable calls to basename().
Attached
Detach File
Event Timeline
Log In to Comment