Hi! GrSecurity patches prevent direct access to any hardware device.
If you are planning to use a LCD display, please consider LCD4Linux, which uses the ppdev userspace access. Luis Correia Bering uClibc Team Member PGP Fingerprint: BC44 D7DA 5A17 F92A CA21 9ABE DFF0 3540 2322 21F6 Key Server: http://pgp.mit.edu > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, November 19, 2004 10:18 AM > To: [EMAIL PROTECTED] > Subject: [leaf-user] lp0 access on Bering 1.2 > > Hi, > > I running Bering 1.2. > Now I try to make a tool to show my beringBOX status via /dev/lp0. > I got a examples code > > #include <stdio.h> > #include <unistd.h> > #include <asm/io.h> > > #define BASEPORT 0x3bc /* lp0 */ > > int main() > { > /* Get access to the ports */ > if (ioperm(BASEPORT, 3, 1)) {perror("ioperm"); exit(1);} > > /* Set the data signals (D0-7) of the port to all low (0) */ > outb(0, BASEPORT); > > /* Sleep for a while (100 ms) */ > usleep(100000); > > /* Read from the status port (BASE+1) and display the result */ > printf("status: %d\n", inb(BASEPORT + 1)); > > /* We don't need the ports anymore */ > if (ioperm(BASEPORT, 3, 0)) {perror("ioperm"); exit(1);} > > exit(0); > } > > If I run it on my BeringBox I got the message: > gersec: denied use of ioperm() by (myprog:13521) UID(0) EUID(0), > parent (sh:789) UID(0) EUID(0) > ioperm: Operation not permitted > > I've try to change the right for lp0 (chmod 777 /dev/lp0) > but it deosn't work :( what can I do else? > > I'm deeply greatful for any suggestions > Phuoc > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: InterSystems CACHE > FREE OODBMS DOWNLOAD - A multidimensional database that combines > robust object and relational technologies, making it a perfect match > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 > -------------------------------------------------------------- > ---------- > leaf-user mailing list: [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/leaf-user > SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html > ------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html