* fhandler.h (fhandler_dev_mem): Add method `init'. Add members

`mem_size' and `init_phase'.
        * fhandler_mem.cc (init): New function to figure out the size of
        the physical memory.
        (open): Add checking for illegal flags. Change usage of access mode.
        (write): Add intended functionality.
        (read): Add parameter checking. Eliminate page size constant. Use
        getpagesize() instead. Don't touch errno and don't create debug output
        while init() is running.
        (lseek): Add bounds checking. Fix SEEK_END.
        (fstat): Eliminate page size constant. Use getpagesize() instead.
        (dup): Add intended functionality.
This commit is contained in:
Corinna Vinschen
2000-10-04 17:08:46 +00:00
parent 52b5a97156
commit f4f898aca0
3 changed files with 148 additions and 21 deletions

View File

@ -767,7 +767,11 @@ public:
class fhandler_dev_mem: public fhandler_base
{
protected:
unsigned long mem_size;
unsigned long pos;
bool init_phase;
void init (void);
public:
fhandler_dev_mem (const char *name, int unit);