[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH v2 5/6] lib/ramfs: fix debug printouts



Hi,

Simon Kuenzer <simon.kuenzer@xxxxxxxxx> writes:

>> On 8. Feb 2019, at 15:31, Yuri Volchkov <yuri.volchkov@xxxxxxxxx> wrote:
>> 
>> Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
>> ---
>> lib/ramfs/ramfs.h       |  4 +++-
>> lib/ramfs/ramfs_vnops.c | 10 ++++++----
>> 2 files changed, 9 insertions(+), 5 deletions(-)
>> 
>> diff --git a/lib/ramfs/ramfs.h b/lib/ramfs/ramfs.h
>> index 91fb579c..43f2f36b 100644
>> --- a/lib/ramfs/ramfs.h
>> +++ b/lib/ramfs/ramfs.h
>> @@ -38,7 +38,7 @@
>> /* #define DEBUG_RAMFS 1 */
>> 
>> #ifdef DEBUG_RAMFS
>> -#define DPRINTF(a)  dprintf a
>> +#define DPRINTF(a)  uk_pr_debug a
>> #else
>> #define DPRINTF(a)    do {} while (0)
>> #endif
>> @@ -68,4 +68,6 @@ struct ramfs_node *ramfs_allocate_node(const char *name, 
>> int type);
>
> I am wondering if we could get rid of this ifdef statement completely because 
> uk_pr_debug is doing enabling/disabling already for us. I saw that you had 
> this on vfscore, too. I would also prefer if we remove the equivalent if 
> statement there, too.
> Just do: #define DPRINTF(a) uk_pr_debug a
Ok, for ramfs it actually makes sense to change it now, since the
signature of a function matches uk_pr_debug.

>
>> 
>> void ramfs_free_node(struct ramfs_node *node);
>> 
>> +#define RAMFS_NODE(vnode) ((struct ramfs_node *) vnode->v_data)
>> +
>> #endif /* !_RAMFS_H */

-- 
Yuri Volchkov
Software Specialist

NEC Europe Ltd
Kurfürsten-Anlage 36
D-69115 Heidelberg

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.