- if (env_hwconfig)
- return hwconfig_parse(env_hwconfig, strlen(env_hwconfig),
- opt, ";", ':', arglen);
+ /* if we are passed a buffer use it, otherwise try the environment */
+ if (!env_hwconfig) {
+ if (!(gd->flags & GD_FLG_ENV_READY)) {
+ printf("WARNING: Calling __hwconfig without a buffer "
+ "and before environment is ready\n");
+ return NULL;
+ }
+ env_hwconfig = getenv("hwconfig");
+ }