Daniel P. Berrangé
94b393dd6e
util/xml: open XML files before calling libxml2
...
Libxml2 has awful error reporting behaviour when reading files. When
we fail to load a file from the test driver we see:
$ virsh -c test:///wibble.xml
I/O warning : failed to load external entity "/wibble.xml"
error: failed to connect to the hypervisor
error: XML error: failed to parse xml document '/wibble.xml'
where the I/O warning line is something printed by libxml2 itself,
which also lacks any useful detail.
Switching to our own file reading code we can massively improve
things:
$ ./build/tools/virsh -c test:///wibble.xml
error: failed to connect to the hypervisor
error: Failed to open file '/wibble.xml': No such file or directory
Using 10 MB as an upper limit on XML file size ought to be sufficient
for any XML files libvirt is reading.
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-12-20 10:00:22 +00:00
..
2024-01-15 14:56:35 +01:00
2024-12-19 15:24:05 +01:00
2024-12-19 15:24:05 +01:00
2024-01-30 10:58:13 +01:00
2024-01-04 22:26:10 +01:00
2024-10-02 16:06:50 +02:00
2024-11-26 14:36:14 +01:00
2024-01-08 01:00:08 -05:00
2024-01-08 01:00:08 -05:00
2024-08-05 11:42:35 +02:00
2024-08-05 11:42:35 +02:00
2024-02-26 11:09:57 +01:00
2024-02-26 10:59:47 +01:00
2024-02-26 10:59:47 +01:00
2024-11-18 13:51:13 +01:00
2024-12-19 15:21:21 +01:00
2024-03-21 14:42:27 +01:00
2024-07-19 15:18:40 +02:00
2024-01-15 14:56:35 +01:00
2024-05-16 14:57:02 +02:00
2024-05-16 14:57:02 +02:00
2024-01-07 23:59:00 -05:00
2024-09-24 08:24:00 +02:00
2024-01-15 14:56:36 +01:00
2024-02-09 14:45:20 -06:00
2024-11-25 22:31:18 +01:00
2024-07-10 12:32:23 +02:00
2024-10-16 14:39:09 +02:00
2024-12-20 10:00:22 +00:00
2024-03-12 10:34:43 +01:00
2024-07-25 16:51:17 +02:00
2024-09-13 12:57:42 +02:00
2024-01-15 14:56:35 +01:00
2024-09-24 08:24:00 +02:00
2024-01-08 01:00:08 -05:00
2024-09-13 12:57:42 +02:00
2024-09-05 15:24:55 +02:00
2024-11-25 22:31:18 +01:00
2023-12-14 17:10:22 +01:00
2024-11-18 15:29:43 +01:00
2024-11-15 09:42:04 +01:00
2024-11-15 09:42:04 +01:00
2024-03-12 17:37:51 +01:00
2024-03-12 17:37:51 +01:00
2023-11-24 09:53:14 +01:00
2024-05-23 14:32:24 +02:00
2024-11-26 13:04:34 +01:00
2024-11-15 13:15:22 +01:00
2024-05-08 15:57:31 +01:00
2024-01-30 10:58:13 +01:00
2024-05-08 16:01:34 +01:00
2024-10-02 16:06:50 +02:00
2024-09-24 08:24:00 +02:00
2024-06-24 13:51:04 +01:00
2024-01-08 01:00:08 -05:00
2024-08-05 11:42:35 +02:00
2024-02-26 14:35:52 +01:00
2024-04-24 09:38:54 -04:00
2024-03-14 15:17:48 +01:00
2024-11-18 13:51:13 +01:00
2024-04-24 14:12:17 +02:00
2024-02-01 10:39:40 +01:00
2024-07-19 15:18:40 +02:00
2024-10-24 18:46:21 +02:00
2024-09-24 08:24:00 +02:00
2024-06-06 09:29:58 +02:00
2024-10-16 14:39:09 +02:00
2024-06-06 09:32:43 +02:00
2024-06-06 09:32:43 +02:00
2024-02-09 14:45:20 -06:00
2024-04-09 16:55:25 +02:00
2024-07-02 09:13:47 +02:00
2024-07-10 12:32:23 +02:00
2024-08-26 16:10:04 +02:00
2024-11-25 22:31:18 +01:00
2024-12-18 15:27:12 +01:00
2024-10-16 15:47:52 +01:00
2024-10-16 15:47:52 +01:00
2024-10-16 15:47:52 +01:00
2024-07-25 16:51:17 +02:00
2024-04-15 09:24:16 +02:00
2024-06-06 09:29:58 +02:00
2024-03-21 14:42:27 +01:00
2024-11-18 08:46:24 +01:00
2024-11-12 15:35:53 +01:00
2024-10-01 12:53:49 +02:00
2024-06-06 09:29:58 +02:00
2023-12-14 17:10:22 +01:00
2024-09-10 14:25:37 +02:00
2024-09-13 12:57:42 +02:00
2024-03-14 15:17:48 +01:00
2024-10-03 13:29:26 +02:00
2024-03-14 15:17:48 +01:00
2024-05-22 23:19:18 -04:00
2024-01-15 14:56:35 +01:00
2024-01-07 23:57:09 -05:00
2024-10-16 15:47:52 +01:00
2024-08-16 13:11:57 +02:00
2024-09-24 08:24:00 +02:00
2024-03-14 15:17:48 +01:00
2024-09-24 08:24:00 +02:00
2024-11-26 14:36:14 +01:00
2024-01-04 22:26:10 +01:00
2024-03-14 15:17:48 +01:00
2024-01-31 17:24:07 +01:00
2024-01-31 17:24:07 +01:00
2024-09-13 12:57:42 +02:00
2024-11-28 10:28:49 +01:00
2024-12-16 11:28:21 +01:00
2024-09-05 15:24:55 +02:00
2024-11-25 22:31:18 +01:00
2023-11-24 09:53:14 +01:00
2024-02-07 14:19:42 +01:00
2024-04-15 09:28:32 +02:00
2024-03-14 15:17:48 +01:00
2024-10-01 12:57:02 +02:00
2024-03-14 15:17:48 +01:00
2024-09-12 09:51:58 +02:00
2024-05-02 15:57:29 -06:00
2024-05-02 15:57:29 -06:00