Re: [E-devel] What is the best way to get device name

2017-02-03 Thread The Rasterman
On Thu, 26 Jan 2017 13:16:57 +0900 cnook said: > Dear All, Hello. > > > > I got following snippet to get device name from fd. > > > > +char name[128]; > +if (ioctl(fd, JSIOCGNAME(sizeof(name)), name) < 0) > + strncpy(name, "Unknown", sizeof(name)); > +printf("Name: %s\n", name); > >

[E-devel] What is the best way to get device name

2017-01-25 Thread cnook
Dear All, Hello. I got following snippet to get device name from fd. +char name[128]; +if (ioctl(fd, JSIOCGNAME(sizeof(name)), name) < 0) + strncpy(name, "Unknown", sizeof(name)); +printf("Name: %s\n", name); I would like to add an API to get device name using this snippet. But it s