Michal Privoznik 1c24cfe9d8 virNumaSetPagePoolSize: Produce friendlier error message
https://bugzilla.redhat.com/show_bug.cgi?id=1224587

The function takes two important arguments (among many others): @node
and @page_size. From these two a path under /sys is constructed. The
path is then used to read and write the desired size of huge pages
pool. However, if the path does not exists due to either @node or
@page_size having nonexistent value (e.g. there's no such NUMA node or
no page size like -2), an cryptic error message is produced:

  virsh # allocpages --pagesize 2049 --pagecount 8 --cellno -2
  error: Failed to open file '/sys/devices/system/node/node-2/hugepages/hugepages-2049kB/nr_hugepages': No such file or directory

Add two more checks to catch this and therefore produce much more
friendlier error messages.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2015-06-10 17:27:16 +02:00
..
2014-07-16 06:48:53 -06:00
2015-04-16 18:35:41 +02:00
2015-04-09 19:27:08 -04:00
2015-04-09 19:27:08 -04:00
2014-12-15 10:34:18 +01:00
2015-01-26 09:14:04 +00:00
2014-04-07 06:14:45 -06:00
2014-04-07 06:14:45 -06:00
2014-10-22 13:09:49 +01:00
2013-12-24 17:36:47 +01:00
2013-12-24 17:36:47 +01:00
2015-04-02 16:05:32 +02:00
2015-04-15 16:43:28 +02:00
2015-03-27 11:06:05 +01:00
2014-12-16 11:15:27 +01:00
2015-03-13 15:31:33 +01:00
2014-03-04 12:24:13 +00:00
2015-03-25 10:00:53 +01:00
2014-10-15 09:25:33 +02:00
2014-07-03 10:41:15 +02:00
2014-03-04 12:24:13 +00:00