Changeset 3dbe4ca2 in mainline for uspace/srv
- Timestamp:
- 2011-04-29T11:10:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ce8f4f4
- Parents:
- d260a95 (diff), 933cadf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/srv
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/devman.c
rd260a95 r3dbe4ca2 39 39 #include <devmap.h> 40 40 #include <str_error.h> 41 #include <stdio.h> 41 42 42 43 #include "devman.h" … … 555 556 } 556 557 557 /** Remember the driver's phone.558 *559 * @param driver The driver.560 * @param phone The phone to the driver.561 */562 void set_driver_phone(driver_t *driver, sysarg_t phone)563 {564 fibril_mutex_lock(&driver->driver_mutex);565 assert(driver->state == DRIVER_STARTING);566 driver->phone = phone;567 fibril_mutex_unlock(&driver->driver_mutex);568 }569 570 558 /** Notify driver about the devices to which it was assigned. 571 559 * … … 685 673 list_initialize(&drv->devices); 686 674 fibril_mutex_initialize(&drv->driver_mutex); 675 drv->phone = -1; 687 676 } 688 677 -
uspace/srv/devman/devman.h
rd260a95 r3dbe4ca2 88 88 89 89 /** Phone asociated with this driver. */ 90 sysarg_t phone;90 int phone; 91 91 /** Name of the device driver. */ 92 92 char *name; … … 316 316 317 317 extern driver_t *find_driver(driver_list_t *, const char *); 318 extern void set_driver_phone(driver_t *, sysarg_t);319 318 extern void initialize_running_driver(driver_t *, dev_tree_t *); 320 319 -
uspace/srv/devman/main.c
rd260a95 r3dbe4ca2 95 95 /* Find driver structure. */ 96 96 driver = find_driver(&drivers_list, drv_name); 97 98 97 if (driver == NULL) { 99 98 log_msg(LVL_ERROR, "No driver named `%s' was found.", drv_name); … … 107 106 drv_name = NULL; 108 107 108 fibril_mutex_lock(&driver->driver_mutex); 109 110 if (driver->phone >= 0) { 111 /* We already have a connection to the driver. */ 112 log_msg(LVL_ERROR, "Driver '%s' already started.\n", 113 driver->name); 114 fibril_mutex_unlock(&driver->driver_mutex); 115 async_answer_0(iid, EEXISTS); 116 return NULL; 117 } 118 119 switch (driver->state) { 120 case DRIVER_NOT_STARTED: 121 /* Somebody started the driver manually. */ 122 log_msg(LVL_NOTE, "Driver '%s' started manually.\n", 123 driver->name); 124 driver->state = DRIVER_STARTING; 125 break; 126 case DRIVER_STARTING: 127 /* The expected case */ 128 break; 129 case DRIVER_RUNNING: 130 /* Should not happen since we do not have a connected phone */ 131 assert(false); 132 } 133 109 134 /* Create connection to the driver. */ 110 135 log_msg(LVL_DEBUG, "Creating connection to the `%s' driver.", … … 113 138 ipc_callid_t callid = async_get_call(&call); 114 139 if (IPC_GET_IMETHOD(call) != IPC_M_CONNECT_TO_ME) { 140 fibril_mutex_unlock(&driver->driver_mutex); 115 141 async_answer_0(callid, ENOTSUP); 116 142 async_answer_0(iid, ENOTSUP); … … 119 145 120 146 /* Remember driver's phone. */ 121 set_driver_phone(driver, IPC_GET_ARG5(call)); 147 driver->phone = IPC_GET_ARG5(call); 148 149 fibril_mutex_unlock(&driver->driver_mutex); 122 150 123 151 log_msg(LVL_NOTE, … … 578 606 method = DRIVER_CLIENT; 579 607 580 if (driver->phone < =0) {608 if (driver->phone < 0) { 581 609 log_msg(LVL_ERROR, 582 610 "Could not forward to driver `%s' (phone is %d).", … … 618 646 dev = fun->dev; 619 647 620 if (dev->state != DEVICE_USABLE || dev->drv->phone < =0) {648 if (dev->state != DEVICE_USABLE || dev->drv->phone < 0) { 621 649 async_answer_0(iid, EINVAL); 622 650 return; -
uspace/srv/fs/fat/fat_fat.c
rd260a95 r3dbe4ca2 47 47 #include <assert.h> 48 48 #include <fibril_synch.h> 49 #include <malloc.h> 49 50 #include <mem.h> 50 51 -
uspace/srv/fs/fat/fat_idx.c
rd260a95 r3dbe4ca2 44 44 #include <assert.h> 45 45 #include <fibril_synch.h> 46 #include <malloc.h> 46 47 47 48 /** Each instance of this type describes one interval of freed VFS indices. */ -
uspace/srv/fs/fat/fat_ops.c
rd260a95 r3dbe4ca2 55 55 #include <sys/mman.h> 56 56 #include <align.h> 57 #include <malloc.h> 57 58 58 59 #define FAT_NODE(node) ((node) ? (fat_node_t *) (node)->data : NULL) … … 724 725 (str_cmp((char *) d->name, FAT_NAME_DOT)) == 0) { 725 726 memset(d, 0, sizeof(fat_dentry_t)); 726 str_cpy((char *) d->name, 8, FAT_NAME_DOT);727 str_cpy((char *) d->ext, 3, FAT_EXT_PAD);727 memcpy(d->name, FAT_NAME_DOT, FAT_NAME_LEN); 728 memcpy(d->ext, FAT_EXT_PAD, FAT_EXT_LEN); 728 729 d->attr = FAT_ATTR_SUBDIR; 729 730 d->firstc = host2uint16_t_le(childp->firstc); … … 734 735 (str_cmp((char *) d->name, FAT_NAME_DOT_DOT) == 0)) { 735 736 memset(d, 0, sizeof(fat_dentry_t)); 736 str_cpy((char *) d->name, 8, FAT_NAME_DOT_DOT);737 str_cpy((char *) d->ext, 3, FAT_EXT_PAD);737 memcpy(d->name, FAT_NAME_DOT_DOT, FAT_NAME_LEN); 738 memcpy(d->ext, FAT_EXT_PAD, FAT_EXT_LEN); 738 739 d->attr = FAT_ATTR_SUBDIR; 739 740 d->firstc = (parentp->firstc == FAT_CLST_ROOT) ? … … 1002 1003 } 1003 1004 1004 /* Determining type of FAT */ 1005 if (FAT_IS_FAT12(bs)) { 1006 printf("Found FAT12 filesystem\n"); 1007 } else if (FAT_IS_FAT16(bs)) { 1008 printf("Found FAT16 filesystem\n"); 1009 } else { 1010 printf("FAT32 filesystem is not supported by FAT server.\n"); 1005 /* Return NOT SUPPORTED if try to mount FAT32 */ 1006 if (!FAT_IS_FAT12(bs) && !FAT_IS_FAT16(bs)) { 1011 1007 block_fini(devmap_handle); 1012 1008 async_answer_0(rid, ENOTSUP); … … 1017 1013 rc = fat_sanity_check(bs, devmap_handle); 1018 1014 if (rc != EOK) { 1019 printf("Sanity check failed\n");1020 1015 (void) block_cache_fini(devmap_handle); 1021 1016 block_fini(devmap_handle); -
uspace/srv/hw/netif/ne2000/dp8390.c
rd260a95 r3dbe4ca2 53 53 #include <byteorder.h> 54 54 #include <errno.h> 55 #include <stdio.h> 55 56 #include <libarch/ddi.h> 56 57 #include <net/packet.h> -
uspace/srv/loader/arch/ia64/_link.ld.in
rd260a95 r3dbe4ca2 28 28 29 29 .got : { 30 _gp = .; 30 /* Tell the linker where we expect GP to point. */ 31 __gp = .; 31 32 *(.got .got.*); 32 33 } :data -
uspace/srv/ns/clonable.c
rd260a95 r3dbe4ca2 78 78 if (list_empty(&cs_req)) { 79 79 /* There was no pending connection request. */ 80 printf( NAME ": Unexpected clonable server.\n");80 printf("%s: Unexpected clonable server.\n", NAME); 81 81 ipc_answer_0(callid, EBUSY); 82 82 return; -
uspace/srv/ns/service.c
rd260a95 r3dbe4ca2 35 35 #include <assert.h> 36 36 #include <errno.h> 37 #include <stdio.h> 38 #include <malloc.h> 37 39 #include "service.h" 38 40 #include "ns.h" -
uspace/srv/ns/task.c
rd260a95 r3dbe4ca2 39 39 #include <stdio.h> 40 40 #include <macros.h> 41 #include <malloc.h> 41 42 #include "task.h" 42 43 #include "ns.h"
Note:
See TracChangeset
for help on using the changeset viewer.