Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 May 2015 10:26:49 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Michael Gmelin <freebsd@grem.de>
Cc:        "freebsd-arch@freebsd.org" <arch@freebsd.org>, Juli Mallett <jmallett@freebsd.org>
Subject:   Re: Further changes to smb(4) API
Message-ID:  <CAJ-VmokyJHTFGgN8t401eFZpUs5gFoxh8DpV1E3hC66u9N8U2g@mail.gmail.com>
In-Reply-To: <20150503164949.5095447e@bsd64.grem.de>
References:  <20150503164949.5095447e@bsd64.grem.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Yes, please do create a library.


-a


On 3 May 2015 at 07:49, Michael Gmelin <freebsd@grem.de> wrote:
> Porting some interesting features, r281985 also introduced a breaking
> ABI/API change to the smbus interface. As Juli pointed out, since this
> is not backwards compatible anyway, we might as well go the whole nine
> yards and try to make the interface as good as possible. There's still
> plenty of time to 11-RELEASE and I'm willing to incorporate further
> changes, assuming there is enough feedback.
>
> As there are only a few ports using this interface and they're all
> very similar in the way it is used, it would be really good to get some
> feedback from actual users of this interface in real world projects.
>
> Juli suggested as a first step to change rbuf and wbuf in smbcmd from
> char* to void* to avoid casting in case of SMB_READW and SMB_WRITEW.
>
> Based on what I've seen in ports using this API, they all seem to
> create wrapper functions around these ioctl commands anyway, so I'm
> curious if it wouldn't make sense to provide functions that wrap
> the smb interface in a library (either in base or as a port):
>
> sysutils/bsdhwmon:
> uint8_t read_byte(int fd, int slave, const char idxreg);
> void write_byte(int fd, int slave, const char idxreg, const char value);
>
> sysutils/consolehm:
> int ReadByte(u_char *return_value, int addr);
> int WriteByte(int addr, int value);
>
> sysutils/gkrellm2:
> static gint
> get_data(int iodev, u_char command, int interface, u_char *ret);
>
> sysutils/healthd:
> static int WriteByte(int addr,int value);
> static int ReadByte(int addr);
>
> sysutils/xmbmon:
> int smbioctl_readB(int slave, int addr);
> void smbioctl_writeB(int slave, int addr, int value);
> int smbioctl_readW(int smb_slave, int addr);
> void smbioctl_writeW(int slave, int addr, int value);
>
> Cheers,
> Michael
>
> --
> Michael Gmelin
> _______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokyJHTFGgN8t401eFZpUs5gFoxh8DpV1E3hC66u9N8U2g>