projects
/
oweals
/
opkg-lede.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change fdopen(fd, "rw+") to fdopen(fd, "r+").
[oweals/opkg-lede.git]
/
libopkg
/
pkg.c
diff --git
a/libopkg/pkg.c
b/libopkg/pkg.c
index b01db61d98148a161d861795dc6c359699bfc470..75e95720b3282a9fffb75154531cface61b01dd5 100644
(file)
--- a/
libopkg/pkg.c
+++ b/
libopkg/pkg.c
@@
-319,7
+319,7
@@
pkg_init_from_file(pkg_t *pkg, const char *filename)
goto err0;
}
goto err0;
}
- control_file = fdopen(fd, "r
w
+");
+ control_file = fdopen(fd, "r+");
if (control_file == NULL) {
perror_msg("%s: fdopen", __FUNCTION__, control_path);
close(fd);
if (control_file == NULL) {
perror_msg("%s: fdopen", __FUNCTION__, control_path);
close(fd);
@@
-1044,7
+1044,7
@@
str_list_t *pkg_get_installed_files(opkg_conf_t *conf, pkg_t *pkg)
free(list_file_name);
return pkg->installed_files;
}
free(list_file_name);
return pkg->installed_files;
}
- list_file = fdopen(fd, "r
w
+");
+ list_file = fdopen(fd, "r+");
if (list_file == NULL) {
opkg_message(conf, OPKG_ERROR, "%s: fdopen: %s",
__FUNCTION__, strerror(errno));
if (list_file == NULL) {
opkg_message(conf, OPKG_ERROR, "%s: fdopen: %s",
__FUNCTION__, strerror(errno));