Skip to content

Commit

Permalink
move seek to beginnig of sysfs fd before reading to resolve power_good
Browse files Browse the repository at this point in the history
sysfs returns empty upon plug out cable
  • Loading branch information
dbarashinvd committed Dec 26, 2023
1 parent 6e02273 commit 6b25da9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ def run(self):
module_fd_path = module_obj.module_power_good_fd_path
self.fds_events_count_dict[module_obj.port_num][fd_name] += 1
try:
val = module_fd.read()
module_fd.seek(0)
val = module_fd.read()
logger.log_info("dynamic detection got module_obj {} with port {} from fd number {} path {} val {} count {}"
.format(module_obj, module_obj.port_num, fd, module_fd_path
, val, self.fds_events_count_dict[module_obj.port_num]))
Expand Down

0 comments on commit 6b25da9

Please sign in to comment.