Optimal file search function?

off_t search_file(int f,off_t *o,char *m){
    if(lseek(f,o[0],0)==-1)exit(-1);
    int h=0,l=strlen(m);
    ssize_t b=1;
    char c;
    while((b=read(f,&c,1))){
        if(c==m[h])h++;else h=0;
        if(h==l)return(o[0]=lseek(f,0,1));}
    if(b==-1)exit(-1);
    return(0);}

The function takes a file-descriptor f and repositions the offset to o and returns the offset to the last character in the first occurrence of the string m.
I think it is a quite fast and minimal implementation, free for grab if you need one.