)]}'
{
  "commit": "668c5f768fe8e2f6160bb6291e339d2627565e19",
  "tree": "dca2a4d5e530b2098b7be2fa093c0bb953140f05",
  "parents": [
    "f599326999196d39df3679aa13ca73d743819550"
  ],
  "author": {
    "name": "Rodolfo García Peñas",
    "email": "kix@kix.es",
    "time": "Sat Sep 15 22:23:44 2012 +0200"
  },
  "committer": {
    "name": "Rafael J. Wysocki",
    "email": "rjw@sisk.pl",
    "time": "Sat Sep 15 22:23:44 2012 +0200"
  },
  "message": "config_parser: parse_line() must not return EINVAL for unknown strings\n\nThe function parse_line(char *str, struct config_par *parv) checks\nif the line is valid. The function returns 0 if the line is empty,\nif the line has only spaces, of if the line is a comment line.\n\nThe function checks if the string (str) starts with a known name like\n\"resume device\" or \"splash\" in a list of names. If the name is found\nthen checks if the name has a correct value. If the value is wrong,\nthe function returns EINVAL.\n\nIf the function don\u0027t find the value in the tables name, returns EINVAL\ntoo. This is a mistake. The parse() function has the config_par argument\nto receive the list of valid names. If we have two lists in the code,\nthe arguments that are in one list and not in the other list will be\ndetected as error, parse_line will return EINVAL and the function parse\nwill fail. Else, the function parse() and parse_line() can use always\nonly one config_par list with all the possible parameters, therefore\nthe parameter config_par is not needed. In this case (only one list),\nif the code has lists to different functions, the parse() function\nwill read all always.\n\nCurrently the suspend-utils code has two lists, parameters, for suspend\noptions and s2ram_parameters for s2ram parameters, but both lists\ncannot be used at the same time in the config file.\n\nThen, probably the best option is remove the return EINVAL return\nfor unknown names.\n\nSigned-off-by: Rafael J. Wysocki \u003crjw@sisk.pl\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d017ccd519c9a9b4a7a99fb07ceafb7e27362f0c",
      "old_mode": 33188,
      "old_path": "config_parser.c",
      "new_id": "24a9cf936d00925661a5b7d6ea7386b504425d9a",
      "new_mode": 33188,
      "new_path": "config_parser.c"
    }
  ]
}
