Changes in / [dfc07c1:e435537] in mainline


Ignore:
Files:
14 added
10 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.common

    rdfc07c1 re435537  
    9898        $(USPACE_PATH)/srv/bd/part/guid_part/g_part \
    9999        $(USPACE_PATH)/srv/bd/part/mbr_part/mbr_part \
     100        $(USPACE_PATH)/srv/bd/sata_bd/sata_bd \
    100101        $(USPACE_PATH)/srv/clipboard/clipboard \
    101102        $(USPACE_PATH)/srv/fs/tmpfs/tmpfs \
     
    122123        nic/ne2k \
    123124        nic/e1k \
    124         nic/rtl8139
     125        nic/rtl8139 \
     126        block/ahci
    125127
    126128RD_DRV_CFG =
  • kernel/generic/src/console/kconsole.c

    rdfc07c1 re435537  
    202202 *
    203203 */
    204 NO_TRACE static int cmdtab_compl(char *input, size_t size, indev_t * indev)
     204NO_TRACE static int cmdtab_compl(char *input, size_t size, indev_t *indev)
    205205{
    206206        const char *name = input;
    207207       
    208208        size_t found = 0;
    209         /* Maximum Match Length : Length of longest matching common substring in
    210            case more than one match is found */
     209       
     210        /*
     211         * Maximum Match Length: Length of longest matching common
     212         * substring in case more than one match is found.
     213         */
    211214        size_t max_match_len = size;
    212215        size_t max_match_len_tmp = size;
     
    229232        }
    230233       
    231         /* If possible completions are more than MAX_TAB_HINTS, ask user whether to display them or not. */
     234        /*
     235         * If the number of possible completions is more than MAX_TAB_HINTS,
     236         * ask the user whether to display them or not.
     237         */
    232238        if (found > MAX_TAB_HINTS) {
    233239                printf("\n");
    234                 continue_showing_hints = console_prompt_display_all_hints(indev, found);
     240                continue_showing_hints =
     241                    console_prompt_display_all_hints(indev, found);
    235242        }
    236243       
     
    240247                while (cmdtab_search_one(name, &pos)) {
    241248                        cmd_info_t *hlp = list_get_instance(pos, cmd_info_t, link);
    242 
     249                       
    243250                        if (continue_showing_hints) {
    244251                                printf("%s (%s)\n", hlp->name, hlp->description);
    245252                                --hints_to_show;
    246253                                ++total_hints_shown;
    247 
    248                                 if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */
    249                                         continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show);
     254                               
     255                                if ((hints_to_show == 0) && (total_hints_shown != found)) {
     256                                        /* Ask user to continue */
     257                                        continue_showing_hints =
     258                                            console_prompt_more_hints(indev, &hints_to_show);
    250259                                }
    251260                        }
    252 
     261                       
    253262                        pos = pos->next;
    254                         for(max_match_len_tmp = 0; output[max_match_len_tmp] == hlp->name[input_len + max_match_len_tmp]
    255                                         && max_match_len_tmp < max_match_len; ++max_match_len_tmp);
     263                       
     264                        for (max_match_len_tmp = 0;
     265                            (output[max_match_len_tmp] ==
     266                            hlp->name[input_len + max_match_len_tmp]) &&
     267                            (max_match_len_tmp < max_match_len); ++max_match_len_tmp);
     268                       
    256269                        max_match_len = max_match_len_tmp;
    257270                }
    258                 /* keep only the characters common in all completions */
     271               
     272                /* Keep only the characters common in all completions */
    259273                output[max_match_len] = 0;
    260274        }
     
    310324                                continue;
    311325                       
    312                         /* Find the beginning of the word
    313                            and copy it to tmp */
     326                        /*
     327                         * Find the beginning of the word
     328                         * and copy it to tmp
     329                         */
    314330                        size_t beg;
    315331                        for (beg = position - 1; (beg > 0) && (!isspace(current[beg]));
     
    333349                                continue;
    334350
    335                         /* We have hints, may be many. In case of more than one hint,
    336                            tmp will contain the common prefix. */
     351                        /*
     352                         * We have hints, possibly many. In case of more than one hint,
     353                         * tmp will contain the common prefix.
     354                         */
    337355                        size_t off = 0;
    338356                        size_t i = 0;
     
    340358                                if (!wstr_linsert(current, ch, position + i, MAX_CMDLINE))
    341359                                        break;
     360                               
    342361                                i++;
    343362                        }
  • kernel/generic/src/debug/symtab.c

    rdfc07c1 re435537  
    210210 *
    211211 */
    212 int symtab_compl(char *input, size_t size, indev_t * indev)
     212int symtab_compl(char *input, size_t size, indev_t *indev)
    213213{
    214214#ifdef CONFIG_SYMTAB
     
    227227        const char *hint;
    228228        char output[MAX_SYMBOL_NAME];
    229         /* Maximum Match Length : Length of longest matching common substring in
    230            case more than one match is found */
     229       
     230        /*
     231         * Maximum Match Length: Length of longest matching common substring in
     232         * case more than one match is found.
     233         */
    231234        size_t max_match_len = size;
    232235        size_t max_match_len_tmp = size;
     
    238241       
    239242        output[0] = 0;
    240 
    241         while ((hint = symtab_search_one(name, &pos))) {
    242                 ++pos;
    243         }
    244 
     243       
     244        while ((hint = symtab_search_one(name, &pos)))
     245                pos++;
     246       
    245247        pos = 0;
    246248       
     
    253255        }
    254256       
    255         /* If possible completions are more than MAX_TAB_HINTS, ask user whether to display them or not. */
     257        /*
     258         * If the number of possible completions is more than MAX_TAB_HINTS,
     259         * ask the user whether to display them or not.
     260         */
    256261        if (found > MAX_TAB_HINTS) {
    257262                printf("\n");
    258                 continue_showing_hints = console_prompt_display_all_hints(indev, found);
     263                continue_showing_hints =
     264                    console_prompt_display_all_hints(indev, found);
    259265        }
    260266       
     
    265271                        sym_name = symbol_table[pos].symbol_name;
    266272                        pos++;
    267 
    268                         if (continue_showing_hints) { /* We are still showing hints */
     273                       
     274                        if (continue_showing_hints) {
     275                                /* We are still showing hints */
    269276                                printf("%s\n", sym_name);
    270277                                --hints_to_show;
    271278                                ++total_hints_shown;
    272 
    273                                 if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */
    274                                         continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show);
     279                               
     280                                if ((hints_to_show == 0) && (total_hints_shown != found)) {
     281                                        /* Ask the user to continue */
     282                                        continue_showing_hints =
     283                                            console_prompt_more_hints(indev, &hints_to_show);
    275284                                }
    276285                        }
    277 
    278                         for(max_match_len_tmp = 0; output[max_match_len_tmp] == sym_name[input_len + max_match_len_tmp]
    279                                         && max_match_len_tmp < max_match_len; ++max_match_len_tmp);
     286                       
     287                        for (max_match_len_tmp = 0;
     288                            (output[max_match_len_tmp] ==
     289                            sym_name[input_len + max_match_len_tmp]) &&
     290                            (max_match_len_tmp < max_match_len); ++max_match_len_tmp);
     291                       
    280292                        max_match_len = max_match_len_tmp;
    281293                }
    282                 /* keep only the characters common in all completions */
     294               
     295                /* Keep only the characters common in all completions */
    283296                output[max_match_len] = 0;
    284297        }
  • uspace/Makefile

    rdfc07c1 re435537  
    8585        srv/vfs \
    8686        srv/bd/ata_bd \
     87        srv/bd/sata_bd \
    8788        srv/bd/file_bd \
    8889        srv/bd/gxe_bd \
     
    105106        drv/infrastructure/root \
    106107        drv/infrastructure/rootvirt \
     108        drv/block/ahci \
    107109        drv/char/i8042 \
    108110        drv/char/ps2mouse \
  • uspace/app/bdsh/cmds/modules/cat/cat.c

    rdfc07c1 re435537  
    176176
    177177        bool reading_stdin = dash_represents_stdin && (str_cmp(fname, "-") == 0);
    178 
     178       
    179179        if (reading_stdin) {
    180180                fd = fileno(stdin);
    181181                /* Allow storing the whole UTF-8 character. */
    182182                blen = STR_BOUNDS(1);
    183         } else {
     183        } else
    184184                fd = open(fname, O_RDONLY);
    185         }
     185       
    186186        if (fd < 0) {
    187187                printf("Unable to open %s\n", fname);
     
    222222                        bytes_to_read = 1;
    223223                } else {
    224                         if ((length != CAT_FULL_FILE)
    225                             && (length - (off64_t)count <= (off64_t)(blen - copied_bytes))) {
     224                        if ((length != CAT_FULL_FILE) &&
     225                            (length - (off64_t)count <= (off64_t)(blen - copied_bytes))) {
    226226                                bytes_to_read = (size_t) (length - count);
    227227                        } else {
     
    229229                        }
    230230                }
     231               
    231232                bytes = read(fd, buff + copied_bytes, bytes_to_read);
    232233                bytes += copied_bytes;
     
    261262                        reads++;
    262263                }
    263 
    264                 if (reading_stdin) {
     264               
     265                if (reading_stdin)
    265266                        fflush(stdout);
    266                 }
    267267        } while (bytes > 0 && !should_quit && (count < length || length == CAT_FULL_FILE));
    268268
  • uspace/lib/c/Makefile

    rdfc07c1 re435537  
    7171        generic/device/nic.c \
    7272        generic/device/pci.c \
     73        generic/device/ahci.c \
    7374        generic/elf/elf_load.c \
    7475        generic/event.c \
  • uspace/lib/c/include/ipc/dev_iface.h

    rdfc07c1 re435537  
    5151        /** Interface provided by USB HID devices. */
    5252        USBHID_DEV_IFACE,
     53        /** Interface provided by AHCI devices. */
     54        AHCI_DEV_IFACE,
    5355
    5456        DEV_IFACE_MAX
  • uspace/lib/drv/Makefile

    rdfc07c1 re435537  
    4444        generic/remote_pci.c \
    4545        generic/remote_usbhc.c \
    46         generic/remote_usbhid.c
     46        generic/remote_usbhid.c \
     47        generic/remote_ahci.c
    4748
    4849include $(USPACE_PREFIX)/Makefile.common
  • uspace/lib/drv/generic/dev_iface.c

    rdfc07c1 re435537  
    4646#include "remote_usbhid.h"
    4747#include "remote_pci.h"
     48#include "remote_ahci.h"
    4849
    4950static iface_dipatch_table_t remote_ifaces = {
     
    5556                &remote_usb_iface,
    5657                &remote_usbhc_iface,
    57                 &remote_usbhid_iface
     58                &remote_usbhid_iface,
     59                &remote_ahci_iface
    5860        }
    5961};
  • uspace/srv/hid/console/console.c

    rdfc07c1 re435537  
    617617       
    618618        size_t pos = 0;
    619 
     619       
    620620        /*
    621621         * Read input from keyboard and copy it to the buffer.
     
    628628                        buf[pos] = cons->char_remains[0];
    629629                        pos++;
     630                       
    630631                        /* Unshift the array. */
    631                         for (size_t i = 1; i < cons->char_remains_len; i++) {
     632                        for (size_t i = 1; i < cons->char_remains_len; i++)
    632633                                cons->char_remains[i - 1] = cons->char_remains[i];
    633                         }
     634                       
    634635                        cons->char_remains_len--;
    635636                }
     637               
    636638                /* Still not enough? Then get another key from the queue. */
    637639                if (pos < size) {
    638640                        link_t *link = prodcons_consume(&cons->input_pc);
    639641                        kbd_event_t *event = list_get_instance(link, kbd_event_t, link);
    640 
     642                       
    641643                        /* Accept key presses of printable chars only. */
    642644                        if ((event->type == KEY_PRESS) && (event->c != 0)) {
     
    645647                                cons->char_remains_len = str_size(cons->char_remains);
    646648                        }
    647 
     649                       
    648650                        free(event);
    649651                }
Note: See TracChangeset for help on using the changeset viewer.