Wolfgang Rohdewald wrote: > On Mittwoch 08 Juni 2005 12:54, Johannes Stezenbach wrote: > > > If OSDSetBlock times out, -ETIMEDOUT is returned. Most other timeouts > > > will return -1. Could this be made more consistent? Also, the return codes > > > in <dvb/osd.h> don't match what the driver does. I don't know what should > > > be done. > > > > We better ask Klaus Schmidinger about this. > > Does he track this list? Or would you ask him? I might not be able to follow > the discussion yet. Usually he reads this list, too. Anyway, since vdr does not check the return code (see dvbosd.c, cDvbOsd:Cmd), you can probably return whatever you like. :D > > Hm, I don't like this ret = 0 everyhwere, why no set ret = 0 by default? > > I also removed the initialization. Now the compiler warns if any > case branch does not set ret, making it more difficult to forget > setting it wherever it is needed. > > I thought about this: > > case A: > case B: > case C: > ret = 0; > goto out; > > but I was not sure whether this reordering would be too intrusive for a > first patch. If you don't object, I will do that. I could also add a label > out0. The BUG() is probably good anyway to ensure no break is used > accidentally. > > } /* end of switch */ > BUG(); /* we should never get here */ > > out0: > ret = 0; > out: > ... I would remove the 'out' label completely. The way it is used is bad programming style. It's not required, a simple 'break' will do. What are OSD_SetTrans, OSD_GetPixel, OSD_Query and OSD_Test good for? Obviously they are not implemented and should be removed, i.e. just return -EINVAL. Oliver -- -------------------------------------------------------- VDR Remote Plugin available at http://www.escape-edv.de/endriss/vdr/ --------------------------------------------------------