On Thu, Aug 30, Richard W.M. Jones wrote: > On Thu, Aug 30, 2012 at 05:53:06PM +0200, Olaf Hering wrote: > > On Thu, Aug 30, Olaf Hering wrote: > > > > > -extern int e2prog (char *name); /* Massive hack for RHEL 5. */ > > > +extern int e2prog (const char *name); /* Massive hack for RHEL 5. */ > > > > > +++ b/daemon/ext2.c > > > > > -e2prog (char *name) > > > +e2prog (const char *name) > > > { > > > char *p = strstr (name, "e2"); > > > if (!p) return 0; > > > p++; > > > + return 0; > > > > > > The whole patch was a mechanical change. e2prog certainly needs a > > better change, if any. Is RHEL still supposed to be handled that way, > > rewriting the command name? > > Unfortunately yes, though only for RHEL 5.
After thinking about that, I think this will work (make a copy of str), so e2prog may not need changes: static const char str[] = "abc"; f() { char tmp[] = str; e2prog(tmp); } Have to try this. Olaf _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs