--- trunk/src/devices/dev_unreadable.c 2007/10/08 16:18:00 4 +++ trunk/src/devices/dev_unreadable.c 2007/10/08 16:19:37 22 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2005 Anders Gavare. All rights reserved. + * Copyright (C) 2004-2006 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: dev_unreadable.c,v 1.9 2005/02/25 06:14:30 debug Exp $ + * $Id: dev_unreadable.c,v 1.12 2006/02/09 20:02:59 debug Exp $ * * A simple device which returns an error for all accesses (both reads and * writes). @@ -44,22 +44,17 @@ /* * dev_unreadable_access(): */ -int dev_unreadable_access(struct cpu *cpu, struct memory *mem, - uint64_t relative_addr, unsigned char *data, size_t len, - int writeflag, void *extra) +DEVICE_ACCESS(unreadable) { return 0; } -/* - * devinit_unreadable(): - */ -int devinit_unreadable(struct devinit *devinit) +DEVINIT(unreadable) { memory_device_register(devinit->machine->memory, devinit->name, devinit->addr, devinit->len, - dev_unreadable_access, NULL, MEM_DEFAULT, NULL); + dev_unreadable_access, NULL, DM_DEFAULT, NULL); return 1; }