diff options
Diffstat (limited to 'bus.c')
-rw-r--r-- | bus.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -64,18 +64,23 @@ static bool util_model_is (char *check_model) { FILE *fp; char content[100]; + bool retval; + + retval = FALSE; if ((fp=fopen("/sys/firmware/devicetree/base/model", "r"))==NULL) { - return FALSE; + return retval; } while(fgets(content, sizeof(content), fp)) { if(strstr(content,check_model)) { - return TRUE; + retval = TRUE; } } - return FALSE; + fclose (fp); + + return retval; } |