diff --git a/codegen/src/lib.rs b/codegen/src/lib.rs index fc8a4ae..50818e1 100644 --- a/codegen/src/lib.rs +++ b/codegen/src/lib.rs @@ -632,9 +632,15 @@ fn include(context: &mut Context, repo: &mut QemuFileRepo, path: &s if context.included.contains(&include_path) { return Ok(()) } - context.included.insert(include_path); + context.included.insert(include_path.clone()); - let (mut repo, str) = repo.include(path)?; + let (mut repo, str) = match repo.include(path) { + Ok(val) => val, + Err(e) => { + let msg = format!("Failed to include file: {}\nError: {:?}", include_path.display(), e); + return Err(io::Error::new(e.kind(), msg)); + } + }; for item in Parser::from_string(Parser::strip_comments(&str)) { context.process(item?)?; } diff --git a/qmp/schema/qapi/machine-target.json b/qmp/schema/qapi/machine-target.json deleted file mode 120000 index 9fb437c..0000000 --- a/qmp/schema/qapi/machine-target.json +++ /dev/null @@ -1 +0,0 @@ -../../../schema/qapi/machine-target.json \ No newline at end of file diff --git a/qmp/schema/qapi/misc-target.json b/qmp/schema/qapi/misc-target.json deleted file mode 120000 index ba06141..0000000 --- a/qmp/schema/qapi/misc-target.json +++ /dev/null @@ -1 +0,0 @@ -../../../schema/qapi/misc-target.json \ No newline at end of file