X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fopkg_install.c;h=5e8596bfea1c83c22ab5fbb2dd3e0ee26a6b1028;hp=02a2be4be70e5e36ad2bb2104143178638e9f3a9;hb=603bec779ab8f0751bc48b0394aadd261fafdcde;hpb=cd3404e22aa9baba2c617ce4d4d7f53e3f54853c diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c index 02a2be4..5e8596b 100644 --- a/libopkg/opkg_install.c +++ b/libopkg/opkg_install.c @@ -1610,13 +1610,8 @@ static int user_prefers_old_conffile(const char *file_name, const char *backup) } if (strcmp(response, "d") == 0) { - char *cmd; - - free(response); - /* XXX: BUG rewrite to use exec or busybox's internal diff */ - sprintf_alloc(&cmd, "diff -u %s %s", backup, file_name); - xsystem(cmd); - free(cmd); + const char *argv[] = {"diff", "-u", backup, file_name, NULL}; + xsystem(argv); printf(" [Press ENTER to continue]\n"); response = file_read_line_alloc(stdin); free(response);