@@ -420,6 +420,8 @@ static int l_istream_read(lua_State* L)
static void update_table(lua_State* L, struct img_type *img)
{
+ struct dict_entry *property;
+
if (L && img) {
luaL_checktype(L, -1, LUA_TTABLE);
@@ -445,6 +447,15 @@ static void update_table(lua_State* L, struct img_type *img)
LUA_PUSH_IMG_NUMBER(img, "size", size);
LUA_PUSH_IMG_NUMBER(img, "checksum", checksum);
+ lua_pushstring(L, "properties");
+ lua_newtable (L);
+ LIST_FOREACH(property, &img->properties, next) {
+ lua_pushstring(L, property->varname);
+ lua_pushstring(L, property->value);
+ lua_settable(L, -3);
+ }
+ lua_settable(L, -3);
+
#ifdef CONFIG_HANDLER_IN_LUA
if (is_type(L, LUA_TYPE_HANDLER)) {
lua_pushstring(L, "copy2file");