Yet Another Example of UNIX A != UNIX B
IIRC from the /usr/group and later POSIX discussions, the only thing that is for sure on the stat structure with a PIPE is that it's marked as such.
That said, I just grabbed my copy of the SVID (Vol 1 pages 126-127)
st_size "For ordinary files, this field is the address of the end of file. For pipes and FIFO's, this field is the count of the data currently in the file. For block-special & char special, this field is undefined."
As for st_ino and st_dev -- the SVID says the ino "uniquely identifies the file in a given file system," and dev uniquely identifies the file system that contains the file."
It further states: "The pair of fields st_ino and st_dev uniquely identifies ordinary files." And then later says "No other significance is associated with this value."
So..... clearly returning an error is wrong. I don't think the Linux scheme hurts anything....