diff mbox

[RFC,v2,4/6] qerror: new error for live block commit, QERR_TOP_NOT_FOUND

Message ID 6dfa5019b22f1d72b1b02ba14efc9766fcb6e0a9.1346351079.git.jcody@redhat.com
State New
Headers show

Commit Message

Jeff Cody Aug. 30, 2012, 6:47 p.m. UTC
Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 qerror.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Eric Blake Aug. 30, 2012, 10:55 p.m. UTC | #1
On 08/30/2012 11:47 AM, Jeff Cody wrote:
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  qerror.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/qerror.h b/qerror.h
> index d0a76a4..7396184 100644
> --- a/qerror.h
> +++ b/qerror.h
> @@ -219,6 +219,9 @@ void assert_no_error(Error *err);
>  #define QERR_TOO_MANY_FILES \
>      ERROR_CLASS_GENERIC_ERROR, "Too many open files"
>  
> +#define QERR_TOP_NOT_FOUND \
> +    ERROR_CLASS_GENERIC_ERROR, "Top image file %s not found"
> +

Are you sure this patch is needed, or should you be using error_setg()?

 http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg04980.html
Jeff Cody Aug. 31, 2012, 2:42 p.m. UTC | #2
On 08/30/2012 06:55 PM, Eric Blake wrote:
> On 08/30/2012 11:47 AM, Jeff Cody wrote:
>> Signed-off-by: Jeff Cody <jcody@redhat.com>
>> ---
>>  qerror.h | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/qerror.h b/qerror.h
>> index d0a76a4..7396184 100644
>> --- a/qerror.h
>> +++ b/qerror.h
>> @@ -219,6 +219,9 @@ void assert_no_error(Error *err);
>>  #define QERR_TOO_MANY_FILES \
>>      ERROR_CLASS_GENERIC_ERROR, "Too many open files"
>>  
>> +#define QERR_TOP_NOT_FOUND \
>> +    ERROR_CLASS_GENERIC_ERROR, "Top image file %s not found"
>> +
> 
> Are you sure this patch is needed, or should you be using error_setg()?
> 
>  http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg04980.html
> 

I think you are right, error_setg() would be the best course - although
I based these patches only on what was in qemu/master currently.
diff mbox

Patch

diff --git a/qerror.h b/qerror.h
index d0a76a4..7396184 100644
--- a/qerror.h
+++ b/qerror.h
@@ -219,6 +219,9 @@  void assert_no_error(Error *err);
 #define QERR_TOO_MANY_FILES \
     ERROR_CLASS_GENERIC_ERROR, "Too many open files"
 
+#define QERR_TOP_NOT_FOUND \
+    ERROR_CLASS_GENERIC_ERROR, "Top image file %s not found"
+
 #define QERR_UNDEFINED_ERROR \
     ERROR_CLASS_GENERIC_ERROR, "An undefined error has occurred"