On 10.10.2006 [11:28:55 -0700], Nishanth Aravamudan wrote: > On 10.10.2006 [15:36:47 +1000], David Gibson wrote: > > I think commit d00d5d32b213b933770ac89ce0559c72996a43fc should be > > reverted. It adds an ERROR() when hugetlbfs_find_path() is unable to > > find a hugepage mount. > > This was from me. > > > While we do print ERROR()s for the other failure cases, I don't > > believe it is appropriate here. The other cases are really "shouldn't > > happen" cases - basic operations which should always work fine. In > > contrast simply not finding a hugetlb mount is a perfectly legitimate > > situation - the application using this function should test the return > > value from hugetlbfs_find_path() and print its own error if > > necessary. Otherwise a program which is able to operate both with and > > without hugepages available can't use this function to quietly test > > which situation is the case. > > Yes, I agree, to be honest. I think I had hoped that > hugetlbfs_find_path() would not be exported, but it is (now that we have > versioning it will be for all of 1.*, at least). I am ok with reverting > this commit. > > Adam?
ERROR'ing because we don't have a hugetlbfs mountpoint is not good, as hugetlbfs_find_path() is an exported interface. Revert the change to just make it a WARNING. Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> diff --git a/hugeutils.c b/hugeutils.c index 922d477..46795d6 100644 --- a/hugeutils.c +++ b/hugeutils.c @@ -213,7 +213,7 @@ const char *hugetlbfs_find_path(void) tmp++; } - ERROR("Could not find hugetlbfs mount point in /proc/mounts. " + WARNING("Could not find hugetlbfs mount point in /proc/mounts. " "Is it mounted?\n"); return NULL; } -- Nishanth Aravamudan <[EMAIL PROTECTED]> IBM Linux Technology Center ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel