Changeset 50bed55d in mainline for uspace/app
- Timestamp:
- 2024-10-18T14:30:56Z (17 months ago)
- Children:
- fad91b9
- Parents:
- 6d55e39
- File:
-
- 1 edited
-
uspace/app/hrctl/hrctl.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/hrctl/hrctl.c
r6d55e39 r50bed55d 159 159 level_str = sif_node_get_attr(narray, "level"); 160 160 if (level_str == NULL) 161 cfg->level = hr_l_empty;161 cfg->level = HR_LVL_UNKNOWN; 162 162 else 163 163 cfg->level = strtol(level_str, NULL, 10); … … 218 218 219 219 retval = 0; 220 cfg->level = hr_l_empty;220 cfg->level = HR_LVL_UNKNOWN; 221 221 cfg->dev_no = 0; 222 222 create = assemble = false; … … 286 286 return 0; 287 287 case 'l': 288 if (cfg->level != hr_l_empty)288 if (cfg->level != HR_LVL_UNKNOWN) 289 289 goto bad; 290 290 cfg->level = strtol(optarg, NULL, 10); 291 291 break; 292 292 case '0': 293 if (cfg->level != hr_l_empty)294 goto bad; 295 cfg->level = hr_l_0;293 if (cfg->level != HR_LVL_UNKNOWN) 294 goto bad; 295 cfg->level = HR_LVL_0; 296 296 break; 297 297 case '1': 298 if (cfg->level != hr_l_empty)299 goto bad; 300 cfg->level = hr_l_1;298 if (cfg->level != HR_LVL_UNKNOWN) 299 goto bad; 300 cfg->level = HR_LVL_1; 301 301 break; 302 302 case '4': 303 if (cfg->level != hr_l_empty)304 goto bad; 305 cfg->level = hr_l_4;303 if (cfg->level != HR_LVL_UNKNOWN) 304 goto bad; 305 cfg->level = HR_LVL_4; 306 306 break; 307 307 case '5': 308 if (cfg->level != hr_l_empty)309 goto bad; 310 cfg->level = hr_l_5;308 if (cfg->level != HR_LVL_UNKNOWN) 309 goto bad; 310 cfg->level = HR_LVL_5; 311 311 break; 312 312 case 'n': … … 325 325 goto bad; 326 326 327 if (create && cfg->level == hr_l_empty) {327 if (create && cfg->level == HR_LVL_UNKNOWN) { 328 328 printf("hrctl: invalid level, exiting\n"); 329 329 return 1;
Note:
See TracChangeset
for help on using the changeset viewer.
