Add overlay_root config option. Opkg checks this location for available space.
[oweals/opkg-lede.git] / libopkg / opkg_conf.c
index 9c1ed34f2aea26e3a432470bde84d3483ccac5ae..864d2ac30992c43a6b9478dbd93acdb6b929f391 100644 (file)
@@ -63,6 +63,7 @@ opkg_option_t options[] = {
          { "download_only", OPKG_OPT_TYPE_BOOL, &_conf.download_only },
          { "nodeps", OPKG_OPT_TYPE_BOOL, &_conf.nodeps },
          { "offline_root", OPKG_OPT_TYPE_STRING, &_conf.offline_root },
          { "download_only", OPKG_OPT_TYPE_BOOL, &_conf.download_only },
          { "nodeps", OPKG_OPT_TYPE_BOOL, &_conf.nodeps },
          { "offline_root", OPKG_OPT_TYPE_STRING, &_conf.offline_root },
+         { "overlay_root", OPKG_OPT_TYPE_STRING, &_conf.overlay_root },
          { "proxy_passwd", OPKG_OPT_TYPE_STRING, &_conf.proxy_passwd },
          { "proxy_user", OPKG_OPT_TYPE_STRING, &_conf.proxy_user },
          { "query-all", OPKG_OPT_TYPE_BOOL, &_conf.query_all },
          { "proxy_passwd", OPKG_OPT_TYPE_STRING, &_conf.proxy_passwd },
          { "proxy_user", OPKG_OPT_TYPE_STRING, &_conf.proxy_user },
          { "query-all", OPKG_OPT_TYPE_BOOL, &_conf.query_all },
@@ -484,11 +485,6 @@ opkg_conf_load(void)
        else
                sprintf_alloc (&lock_file, "%s", OPKGLOCKFILE);
 
        else
                sprintf_alloc (&lock_file, "%s", OPKGLOCKFILE);
 
-       if (lock_file == NULL) {
-               opkg_perror(ERROR, "Could not allocate memory for lock file name");
-               goto err2;
-       }
-
        lock_fd = creat(lock_file, S_IRUSR | S_IWUSR | S_IRGRP);
        if (lock_fd == -1) {
                opkg_perror(ERROR, "Could not create lock file %s", lock_file);
        lock_fd = creat(lock_file, S_IRUSR | S_IWUSR | S_IRGRP);
        if (lock_fd == -1) {
                opkg_perror(ERROR, "Could not create lock file %s", lock_file);