Lines Matching refs:hs
626 int hs = sizeof(hdr); in pg_write() local
629 if (count < hs) return -EINVAL; in pg_write()
631 if (copy_from_user((char *)&hdr, buf, hs)) in pg_write()
636 if ((count - hs) > PG_MAX_DATA) return -EINVAL; in pg_write()
639 if (count != hs) return -EINVAL; in pg_write()
656 if (copy_from_user(PG.bufptr, buf + hs, count - hs)) in pg_write()
667 int hs = sizeof(hdr); in pg_read() local
671 if (count < hs) return -EINVAL; in pg_read()
685 if (copy > (count - hs)) copy = count - hs; in pg_read()
691 if (copy_to_user(buf, (char *)&hdr, hs)) in pg_read()
694 if (copy_to_user(buf+hs,PG.bufptr,copy)) in pg_read()
696 return copy+hs; in pg_read()