X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fum%2Fkernel%2Fmem_user.c;h=c52744b01d6ca608aa904571087c0aa431afafe7;hb=1be35e94e1da3669db492995cd2c8b1a37016b11;hp=b6d6a61b43a67cd77f9bb486add0353eeaa299b8;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/arch/um/kernel/mem_user.c b/arch/um/kernel/mem_user.c index b6d6a61b4..c52744b01 100644 --- a/arch/um/kernel/mem_user.c +++ b/arch/um/kernel/mem_user.c @@ -143,7 +143,7 @@ static int __init parse_iomem(char *str, int *add) struct iomem_region *new; struct uml_stat buf; char *file, *driver; - int fd, err, size; + int fd, err; driver = str; file = strchr(str,','); @@ -171,12 +171,10 @@ static int __init parse_iomem(char *str, int *add) goto out_close; } - size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1); - *new = ((struct iomem_region) { .next = iomem_regions, .driver = driver, .fd = fd, - .size = size, + .size = buf.ust_size, .phys = 0, .virt = 0 }); iomem_regions = new; @@ -208,39 +206,6 @@ int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x, return(0); } -#if 0 -/* Debugging facility for dumping stuff out to the host, avoiding the timing - * problems that come with printf and breakpoints. - * Enable in case of emergency. - */ - -int logging = 1; -int logging_fd = -1; - -int logging_line = 0; -char logging_buf[512]; - -void log(char *fmt, ...) -{ - va_list ap; - struct timeval tv; - struct openflags flags; - - if(logging == 0) return; - if(logging_fd < 0){ - flags = of_create(of_trunc(of_rdwr(OPENFLAGS()))); - logging_fd = os_open_file("log", flags, 0644); - } - gettimeofday(&tv, NULL); - sprintf(logging_buf, "%d\t %u.%u ", logging_line++, tv.tv_sec, - tv.tv_usec); - va_start(ap, fmt); - vsprintf(&logging_buf[strlen(logging_buf)], fmt, ap); - va_end(ap); - write(logging_fd, logging_buf, strlen(logging_buf)); -} -#endif - /* * Overrides for Emacs so that we follow Linus's tabbing style. * Emacs will notice this stuff at the end of the file and automatically