* [PATCH ipmi-fru-parser v3] Replacing std::ifstream by access(2) for checking file existence
@ 2016-06-01 7:30 OpenBMC Patches
2016-06-01 7:30 ` OpenBMC Patches
0 siblings, 1 reply; 2+ messages in thread
From: OpenBMC Patches @ 2016-06-01 7:30 UTC (permalink / raw)
To: openbmc
Fixes problem reported by issue https://github.com/openbmc/ipmi-fru-parser/issues/12
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/openbmc/ipmi-fru-parser/17)
<!-- Reviewable:end -->
https://github.com/openbmc/ipmi-fru-parser/pull/17
vishwa (1):
Replacing std::ifstream by access(2) for checking file existence
writefrudata.C | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.8.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH ipmi-fru-parser v3] Replacing std::ifstream by access(2) for checking file existence
2016-06-01 7:30 [PATCH ipmi-fru-parser v3] Replacing std::ifstream by access(2) for checking file existence OpenBMC Patches
@ 2016-06-01 7:30 ` OpenBMC Patches
0 siblings, 0 replies; 2+ messages in thread
From: OpenBMC Patches @ 2016-06-01 7:30 UTC (permalink / raw)
To: openbmc
From: vishwa <vishwanath@in.ibm.com>
---
writefrudata.C | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/writefrudata.C b/writefrudata.C
index 7ee2127..6791148 100644
--- a/writefrudata.C
+++ b/writefrudata.C
@@ -663,7 +663,7 @@ int ipmi_validate_fru_area(const uint8_t fruid, const char *fru_file_name,
(fruid, get_fru_area_type(fru_entry), bus_type, bmc_fru);
// Physically being present
- bool present = std::ifstream(fru_file_name);
+ bool present = access(fru_file_name, F_OK) == 0;
fru_area->set_present(present);
// Only setup dbus path for areas defined in BMC.
--
2.8.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-01 7:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-01 7:30 [PATCH ipmi-fru-parser v3] Replacing std::ifstream by access(2) for checking file existence OpenBMC Patches
2016-06-01 7:30 ` OpenBMC Patches
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.