[libvirt] [PATCHv2 6/8] Move functions using iscsiadm to viriscsi.c
Daniel P. Berrange
berrange at redhat.com
Thu Mar 20 15:03:00 UTC 2014
On Wed, Mar 19, 2014 at 04:35:31PM +0000, Daniel P. Berrange wrote:
> On Wed, Mar 19, 2014 at 04:52:31PM +0100, Ján Tomko wrote:
> > diff --git a/src/util/viriscsi.h b/src/util/viriscsi.h
> > new file mode 100644
> > index 0000000..462e56a
> > --- /dev/null
> > +++ b/src/util/viriscsi.h
> > @@ -0,0 +1,52 @@
> > +#ifndef __VIR_ISCSI_H__
> > +# define __VIR_ISCSI_H__
> > +
> > +# include "internal.h"
> > +
> > +char *
> > +virISCSIGetSession(const char *devpath,
> > + bool probe);
>
> Could add ATTRIBUTE_NONNULL for this 'const char *' and all
> the other pointers below
>
> > +
> > +int
> > +virISCSIConnectionLogin(const char *portal,
> > + const char *initiatoriqn,
> > + const char *target);
> > +int
> > +virISCSIConnectionLogout(const char *portal,
> > + const char *initiatoriqn,
> > + const char *target);
> > +int
> > +virISCSIRescanLUNs(const char *session);
> > +
> > +int
> > +virISCSIScanTargets(const char *portal,
> > + const char *initiatoriqn,
> > + size_t *ntargetsret,
> > + char ***targetsret);
> > +int
> > +virISCSINodeUpdate(const char *portal,
> > + const char *target,
> > + const char *name,
> > + const char *value);
>
> And these 5 could have ATTRIBUTE_RETURN_CHECK too
Btw, I meant to say ACK - you can add the attribute annotations without
reposting this series.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list