Changes in / [831507b:1fff583] in mainline


Ignore:
Files:
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • tools/imgutil.py

    r831507b r1fff583  
    9292                if name in exclude_names:
    9393                        continue
    94                
    9594                item = ItemToPack(path, name)
    96                
    9795                if not (item.is_dir or item.is_file):
    9896                        continue
    99                
    10097                yield item
    10198
     
    105102        inf = open(item.path, 'rb')
    106103        rd = 0
    107        
    108104        while (rd < item.size):
    109105                data = bytes(inf.read(chunk_size))
    110106                yield data
    111107                rd += len(data)
    112        
    113108        inf.close()
  • tools/mkfat.py

    r831507b r1fff583  
    168168"""
    169169
    170 LFN_DIR_ENTRY = """little:
    171         uint8_t seq                /* sequence number */
    172         char name1[10]             /* first part of the name */
    173         uint8_t attr               /* attributes */
    174         uint8_t rec_type           /* LFN record type */
    175         uint8_t checksum           /* LFN checksum */
    176         char name2[12]             /* second part of the name */
    177         uint16_t cluster           /* cluster */
    178         char name3[4]              /* third part of the name */
    179 """
    180 
    181 lchars = set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
    182               'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
    183               'U', 'V', 'W', 'X', 'Y', 'Z',
    184               '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
    185               '!', '#', '$', '%', '&', '\'', '(', ')', '-', '@',
    186               '^', '_', '`', '{', '}', '~', '.'])
    187 
    188 def fat_lchars(name):
    189         "Filter FAT legal characters"
    190        
    191         filtered_name = ''
    192         filtered = False
    193        
    194         for char in name.encode('ascii', 'replace').upper():
    195                 if char in lchars:
    196                         filtered_name += char
    197                 else:
    198                         filtered_name += b'_'
    199                         filtered = True
    200        
    201         return (filtered_name, filtered)
    202 
    203 def fat_name83(name, name83_list):
    204         "Create a 8.3 name for the given name"
    205        
    206         ascii_name, lfn = fat_lchars(name)
    207         ascii_parts = ascii_name.split('.')
    208        
    209         short_name = ''
    210         short_ext = ''
    211        
    212         if len(ascii_name) > 11:
     170LFN_ENTRY = """little:
     171        uint8_t pos
     172        uint16_t name1[5]
     173        uint8_t attr
     174        uint8_t type
     175        uint8_t csum
     176        uint16_t name2[6]
     177        uint16_t fc
     178        uint16_t name3[2]
     179"""
     180
     181# Global variable to hold the file names in 8.3 format. Needed to
     182# keep track of "number" when creating a short fname from a LFN.
     183name83_list = []
     184
     185def name83(fname):
     186        "Create a 8.3 name for the given fname"
     187
     188        # FIXME: filter illegal characters
     189        parts = fname.split('.')
     190       
     191        name = ''
     192        ext = ''
     193        lfn = False
     194
     195        if len(fname) > 11 :
    213196                lfn = True
    214        
    215         if len(ascii_parts) > 0:
    216                 short_name = ascii_parts[0]
    217                 if len(short_name) > 8:
     197
     198        if len(parts) > 0:
     199                name = parts[0]
     200                if len(name) > 8 :
    218201                        lfn = True
    219        
    220         if len(ascii_parts) > 1:
    221                 short_ext = ascii_parts[-1]
    222                 if len(short_ext) > 3:
     202
     203        if len(parts) > 1 :
     204                ext = parts[-1]
     205                if len(ext) > 3 :
    223206                        lfn = True
    224        
    225         if len(ascii_parts) > 2:
     207
     208        if len(parts) > 2 :
    226209                lfn = True
    227        
    228         if lfn == False:
    229                 name83_list.append(short_name + '.' + short_ext)
    230                 return (short_name.ljust(8)[0:8], short_ext.ljust(3)[0:3], False)
    231        
     210
     211        if (lfn == False) :
     212                return (name.ljust(8)[0:8], ext.ljust(3)[0:3], False)
     213
    232214        # For filenames with multiple extensions, we treat the last one
    233215        # as the actual extension. The rest of the filename is stripped
    234216        # of dots and concatenated to form the short name
    235         for part in ascii_parts[1:-1]:
    236                 short_name += part
    237        
    238         for number in range(1, 999999):
    239                 number_str = ('~' + str(number)).upper()
    240                
    241                 if len(short_name) + len(number_str) > 8:
    242                         short_name = short_name[0:8 - len(number_str)]
    243                
    244                 short_name += number_str;
    245                
    246                 if not (short_name + '.' + short_ext) in name83_list:
     217        for _name in parts[1:-1]:
     218                name = name + _name             
     219
     220        global name83_list
     221        for number in range(1, 10000) :
     222                number_str = '~' + str(number)
     223
     224                if len(name) + len(number_str) > 8 :
     225                        name = name[0:8 - len(number_str)]
     226
     227                name = name + number_str;
     228
     229                if (name + ext) not in name83_list :
    247230                        break
    248        
    249         name83_list.append(short_name + '.' + short_ext)
    250         return (short_name.ljust(8)[0:8], short_ext.ljust(3)[0:3], True)
    251 
    252 def create_lfn_dirent(name, seq, checksum):
    253         "Create LFN directory entry"
    254        
    255         entry = xstruct.create(LFN_DIR_ENTRY)
    256         name_rest = name[26:]
    257        
    258         if len(name_rest) > 0:
    259                 entry.seq = seq
    260         else:
    261                 entry.seq = seq | 0x40
    262        
    263         entry.name1 = name[0:10]
    264         entry.name2 = name[10:22]
    265         entry.name3 = name[22:26]
    266        
    267         entry.attr = 0x0F
    268         entry.rec_type = 0
    269         entry.checksum = checksum
    270         entry.cluster = 0
    271        
    272         return (entry, name_rest)
    273 
    274 def lfn_checksum(name):
    275         "Calculate LFN checksum"
    276        
    277         checksum = 0
    278         for i in range(0, 11):
    279                 checksum = (((checksum & 1) << 7) + (checksum >> 1) + ord(name[i])) & 0xFF
    280        
    281         return checksum
    282 
    283 def create_dirent(name, name83_list, directory, cluster, size):
    284         short_name, short_ext, lfn = fat_name83(name, name83_list)
     231                       
     232        name83_list.append(name + ext) 
     233
     234        return (name.ljust(8)[0:8], ext.ljust(3)[0:3], True)
     235
     236def get_utf16(name, l) :
     237        "Create a int array out of a string which we can store in uint16_t arrays"
     238
     239        bs = [0xFFFF for i in range(l)]
     240
     241        for i in range(len(name)) :
     242                bs[i] = ord(name[i])
     243       
     244        if (len(name) < l) :
     245                bs[len(name)] = 0;
     246       
     247        return bs
     248
     249def create_lfn_entry((name, index)) :
     250        entry = xstruct.create(LFN_ENTRY)
     251
     252        entry.name1 = get_utf16(name[0:5], 5)
     253        entry.name2 = get_utf16(name[5:11], 6)
     254        entry.name3 = get_utf16(name[11:13], 2)
     255        entry.pos = index
     256
     257        entry.attr = 0xF
     258        entry.fc = 0
     259        entry.type = 0
     260
     261        return entry
     262
     263def create_dirent(name, directory, cluster, size):
    285264       
    286265        dir_entry = xstruct.create(DIR_ENTRY)
    287266       
    288         dir_entry.name = short_name
    289         dir_entry.ext = short_ext
    290        
     267        dir_entry.name, dir_entry.ext, lfn = name83(name)
     268
     269        dir_entry.name = dir_entry.name.upper().encode('ascii')
     270        dir_entry.ext = dir_entry.ext.upper().encode('ascii')
     271
    291272        if (directory):
    292273                dir_entry.attr = 0x30
     
    308289                dir_entry.size = size
    309290       
     291
    310292        if not lfn:
    311293                return [dir_entry]
    312        
    313         long_name = name.encode('utf_16_le')
    314         entries = [dir_entry]
    315        
    316         seq = 1
    317         checksum = lfn_checksum(dir_entry.name + dir_entry.ext)
    318        
    319         while len(long_name) > 0:
    320                 long_entry, long_name = create_lfn_dirent(long_name, seq, checksum)
    321                 entries.append(long_entry)
    322                 seq += 1
    323        
    324         entries.reverse()
     294
     295        n = len(name) / 13 + 1
     296        names = [(name[i * 13: (i + 1) * 13 + 1], i + 1) for i in range(n)]
     297
     298        entries = sorted(map (create_lfn_entry, names), reverse = True, key = lambda e : e.pos)
     299        entries[0].pos |= 0x40
     300
     301        fname11 = dir_entry.name + dir_entry.ext
     302
     303        csum = 0
     304        for i in range(0, 11) :
     305                csum = ((csum & 1) << 7) + (csum  >> 1) + ord(fname11[i])
     306                csum = csum & 0xFF
     307       
     308        for e in entries :
     309                e.csum = csum;
     310       
     311        entries.append(dir_entry)
     312
    325313        return entries
    326314
     
    367355       
    368356        directory = []
    369         name83_list = []
    370        
    371         if not head:
     357       
     358        if (not head):
    372359                # Directory cluster preallocation
    373360                empty_cluster = fat.index(0)
    374                 fat[empty_cluster] = 0xFFFF
     361                fat[empty_cluster] = 0xffff
    375362               
    376363                directory.append(create_dot_dirent(empty_cluster))
     
    379366                empty_cluster = 0
    380367       
    381         for item in listdir_items(root):
     368        for item in listdir_items(root):               
    382369                if item.is_file:
    383370                        rv = write_file(item, outf, cluster_size, data_start, fat, reserved_clusters)
    384                         directory.extend(create_dirent(item.name, name83_list, False, rv[0], rv[1]))
     371                        directory.extend(create_dirent(item.name, False, rv[0], rv[1]))
    385372                elif item.is_dir:
    386373                        rv = recursion(False, item.path, outf, cluster_size, root_start, data_start, fat, reserved_clusters, dirent_size, empty_cluster)
    387                         directory.extend(create_dirent(item.name, name83_list, True, rv[0], rv[1]))
    388        
    389         if head:
     374                        directory.extend(create_dirent(item.name, True, rv[0], rv[1]))
     375       
     376        if (head):
    390377                outf.seek(root_start)
    391378                for dir_entry in directory:
     
    444431        extra_bytes = int(sys.argv[1])
    445432       
    446         path = os.path.abspath(sys.argv[2].decode())
     433        path = os.path.abspath(sys.argv[2])
    447434        if (not os.path.isdir(path)):
    448435                print("<PATH> must be a directory")
     
    542529       
    543530        outf.close()
    544 
     531       
    545532if __name__ == '__main__':
    546533        main()
  • uspace/app/tester/Makefile

    r831507b r1fff583  
    5050        vfs/vfs1.c \
    5151        ipc/ping_pong.c \
    52         ipc/starve.c \
    5352        loop/loop1.c \
    5453        mm/common.c \
  • uspace/app/tester/tester.c

    r831507b r1fff583  
    6060#include "vfs/vfs1.def"
    6161#include "ipc/ping_pong.def"
    62 #include "ipc/starve.def"
    6362#include "loop/loop1.def"
    6463#include "mm/malloc1.def"
  • uspace/app/tester/tester.h

    r831507b r1fff583  
    9393extern const char *test_vfs1(void);
    9494extern const char *test_ping_pong(void);
    95 extern const char *test_starve_ipc(void);
    9695extern const char *test_loop1(void);
    9796extern const char *test_malloc1(void);
  • uspace/lib/c/generic/async.c

    r831507b r1fff583  
    189189        /** If reply was received. */
    190190        bool done;
    191 
    192         /** If the message / reply should be discarded on arrival. */
    193         bool forget;
    194 
    195         /** If already destroyed. */
    196         bool destroyed;
    197191       
    198192        /** Pointer to where the answer data is stored. */
     
    246240/** Identifier of the incoming connection handled by the current fibril. */
    247241static fibril_local connection_t *fibril_connection;
    248 
    249 static void to_event_initialize(to_event_t *to)
    250 {
    251         struct timeval tv = { 0, 0 };
    252 
    253         to->inlist = false;
    254         to->occurred = false;
    255         link_initialize(&to->link);
    256         to->expires = tv;
    257 }
    258 
    259 static void wu_event_initialize(wu_event_t *wu)
    260 {
    261         wu->inlist = false;
    262         link_initialize(&wu->link);
    263 }
    264 
    265 void awaiter_initialize(awaiter_t *aw)
    266 {
    267         aw->fid = 0;
    268         aw->active = false;
    269         to_event_initialize(&aw->to_event);
    270         wu_event_initialize(&aw->wu_event);
    271 }
    272 
    273 static amsg_t *amsg_create(void)
    274 {
    275         amsg_t *msg;
    276 
    277         msg = malloc(sizeof(amsg_t));
    278         if (msg) {
    279                 msg->done = false;
    280                 msg->forget = false;
    281                 msg->destroyed = false;
    282                 msg->dataptr = NULL;
    283                 msg->retval = (sysarg_t) EINVAL;
    284                 awaiter_initialize(&msg->wdata);
    285         }
    286 
    287         return msg;
    288 }
    289 
    290 static void amsg_destroy(amsg_t *msg)
    291 {
    292         assert(!msg->destroyed);
    293         msg->destroyed = true;
    294         free(msg);
    295 }
    296242
    297243static void *default_client_data_constructor(void)
     
    1017963               
    1018964                suseconds_t timeout;
    1019                 unsigned int flags = SYNCH_FLAGS_NONE;
    1020965                if (!list_empty(&timeout_list)) {
    1021966                        awaiter_t *waiter = list_get_instance(
     
    1028973                                futex_up(&async_futex);
    1029974                                handle_expired_timeouts();
    1030                                 /*
    1031                                  * Notice that even if the event(s) already
    1032                                  * expired (and thus the other fibril was
    1033                                  * supposed to be running already),
    1034                                  * we check for incoming IPC.
    1035                                  *
    1036                                  * Otherwise, a fibril that continuously
    1037                                  * creates (almost) expired events could
    1038                                  * prevent IPC retrieval from the kernel.
    1039                                  */
    1040                                 timeout = 0;
    1041                                 flags = SYNCH_FLAGS_NON_BLOCKING;
    1042 
    1043                         } else {
     975                                continue;
     976                        } else
    1044977                                timeout = tv_sub(&waiter->to_event.expires, &tv);
    1045                                 futex_up(&async_futex);
    1046                         }
    1047                 } else {
    1048                         futex_up(&async_futex);
     978                } else
    1049979                        timeout = SYNCH_NO_TIMEOUT;
    1050                 }
     980               
     981                futex_up(&async_futex);
    1051982               
    1052983                atomic_inc(&threads_in_ipc_wait);
    1053984               
    1054985                ipc_call_t call;
    1055                 ipc_callid_t callid = ipc_wait_cycle(&call, timeout, flags);
     986                ipc_callid_t callid = ipc_wait_cycle(&call, timeout,
     987                    SYNCH_FLAGS_NONE);
    1056988               
    1057989                atomic_dec(&threads_in_ipc_wait);
     
    11681100       
    11691101        msg->done = true;
    1170 
    1171         if (msg->forget) {
    1172                 assert(msg->wdata.active);
    1173                 amsg_destroy(msg);
    1174         } else if (!msg->wdata.active) {
     1102        if (!msg->wdata.active) {
    11751103                msg->wdata.active = true;
    11761104                fibril_add_ready(msg->wdata.fid);
    11771105        }
    1178 
     1106       
    11791107        futex_up(&async_futex);
    11801108}
     
    12031131                return 0;
    12041132       
    1205         amsg_t *msg = amsg_create();
     1133        amsg_t *msg = malloc(sizeof(amsg_t));
    12061134        if (msg == NULL)
    12071135                return 0;
    12081136       
     1137        msg->done = false;
    12091138        msg->dataptr = dataptr;
     1139       
     1140        msg->wdata.to_event.inlist = false;
     1141       
     1142        /*
     1143         * We may sleep in the next method,
     1144         * but it will use its own means
     1145         */
    12101146        msg->wdata.active = true;
    12111147       
     
    12411177                return 0;
    12421178       
    1243         amsg_t *msg = amsg_create();
     1179        amsg_t *msg = malloc(sizeof(amsg_t));
     1180       
    12441181        if (msg == NULL)
    12451182                return 0;
    12461183       
     1184        msg->done = false;
    12471185        msg->dataptr = dataptr;
     1186       
     1187        msg->wdata.to_event.inlist = false;
     1188       
     1189        /*
     1190         * We may sleep in the next method,
     1191         * but it will use its own means
     1192         */
    12481193        msg->wdata.active = true;
    12491194       
     
    12681213       
    12691214        futex_down(&async_futex);
    1270 
    1271         assert(!msg->forget);
    1272         assert(!msg->destroyed);
    1273 
    12741215        if (msg->done) {
    12751216                futex_up(&async_futex);
     
    12901231                *retval = msg->retval;
    12911232       
    1292         amsg_destroy(msg);
     1233        free(msg);
    12931234}
    12941235
    12951236/** Wait for a message sent by the async framework, timeout variant.
    1296  *
    1297  * If the wait times out, the caller may choose to either wait again by calling
    1298  * async_wait_for() or async_wait_timeout(), or forget the message via
    1299  * async_forget().
    13001237 *
    13011238 * @param amsgid  Hash of the message to wait for.
     
    13121249       
    13131250        amsg_t *msg = (amsg_t *) amsgid;
    1314 
     1251       
     1252        /* TODO: Let it go through the event read at least once */
     1253        if (timeout < 0)
     1254                return ETIMEOUT;
     1255       
    13151256        futex_down(&async_futex);
    1316 
    1317         assert(!msg->forget);
    1318         assert(!msg->destroyed);
    1319 
    13201257        if (msg->done) {
    13211258                futex_up(&async_futex);
     
    13231260        }
    13241261       
    1325         /*
    1326          * Negative timeout is converted to zero timeout to avoid
    1327          * using tv_add with negative augmenter.
    1328          */
    1329         if (timeout < 0)
    1330                 timeout = 0;
    1331 
    13321262        gettimeofday(&msg->wdata.to_event.expires, NULL);
    13331263        tv_add(&msg->wdata.to_event.expires, timeout);
    13341264       
    1335         /*
    1336          * Current fibril is inserted as waiting regardless of the
    1337          * "size" of the timeout.
    1338          *
    1339          * Checking for msg->done and immediately bailing out when
    1340          * timeout == 0 would mean that the manager fibril would never
    1341          * run (consider single threaded program).
    1342          * Thus the IPC answer would be never retrieved from the kernel.
    1343          *
    1344          * Notice that the actual delay would be very small because we
    1345          * - switch to manager fibril
    1346          * - the manager sees expired timeout
    1347          * - and thus adds us back to ready queue
    1348          * - manager switches back to some ready fibril
    1349          *   (prior it, it checks for incoming IPC).
    1350          *
    1351          */
    13521265        msg->wdata.fid = fibril_get_id();
    13531266        msg->wdata.active = false;
     
    13661279                *retval = msg->retval;
    13671280       
    1368         amsg_destroy(msg);
     1281        free(msg);
    13691282       
    13701283        return 0;
    13711284}
    1372  
    1373 /** Discard the message / reply on arrival.
    1374  *
    1375  * The message will be marked to be discarded once the reply arrives in
    1376  * reply_received(). It is not allowed to call async_wait_for() or
    1377  * async_wait_timeout() on this message after a call to this function.
    1378  *
    1379  * @param amsgid  Hash of the message to forget.
    1380  */
    1381 void async_forget(aid_t amsgid)
    1382 {
    1383         amsg_t *msg = (amsg_t *) amsgid;
    1384 
    1385         assert(msg);
    1386         assert(!msg->forget);
    1387         assert(!msg->destroyed);
    1388 
    1389         futex_down(&async_futex);
    1390         if (msg->done)
    1391                 amsg_destroy(msg);
    1392         else
    1393                 msg->forget = true;
    1394         futex_up(&async_futex);
    1395 }
    13961285
    13971286/** Wait for specified time.
     
    14041293void async_usleep(suseconds_t timeout)
    14051294{
    1406         amsg_t *msg = amsg_create();
     1295        amsg_t *msg = malloc(sizeof(amsg_t));
     1296       
    14071297        if (!msg)
    14081298                return;
    14091299       
    14101300        msg->wdata.fid = fibril_get_id();
     1301        msg->wdata.active = false;
    14111302       
    14121303        gettimeofday(&msg->wdata.to_event.expires, NULL);
     
    14221313        /* Futex is up automatically after fibril_switch() */
    14231314       
    1424         amsg_destroy(msg);
     1315        free(msg);
    14251316}
    14261317
     
    16931584        ipc_call_t result;
    16941585       
    1695         amsg_t *msg = amsg_create();
    1696         if (!msg) {
     1586        amsg_t *msg = malloc(sizeof(amsg_t));
     1587        if (msg == NULL) {
    16971588                free(sess);
    16981589                errno = ENOMEM;
     
    17001591        }
    17011592       
     1593        msg->done = false;
    17021594        msg->dataptr = &result;
     1595       
     1596        msg->wdata.to_event.inlist = false;
     1597       
     1598        /*
     1599         * We may sleep in the next method,
     1600         * but it will use its own means
     1601         */
    17031602        msg->wdata.active = true;
    17041603       
     
    17441643        ipc_call_t result;
    17451644       
    1746         amsg_t *msg = amsg_create();
    1747         if (!msg)
     1645        amsg_t *msg = malloc(sizeof(amsg_t));
     1646        if (msg == NULL)
    17481647                return ENOENT;
    17491648       
     1649        msg->done = false;
    17501650        msg->dataptr = &result;
     1651       
     1652        msg->wdata.to_event.inlist = false;
     1653       
     1654        /*
     1655         * We may sleep in the next method,
     1656         * but it will use its own means
     1657         */
    17511658        msg->wdata.active = true;
    17521659       
     
    23442251            IPC_FF_ROUTE_FROM_ME);
    23452252        if (retval != EOK) {
    2346                 async_forget(msg);
     2253                async_wait_for(msg, NULL);
    23472254                ipc_answer_0(callid, retval);
    23482255                return retval;
     
    25382445            IPC_FF_ROUTE_FROM_ME);
    25392446        if (retval != EOK) {
    2540                 async_forget(msg);
     2447                async_wait_for(msg, NULL);
    25412448                ipc_answer_0(callid, retval);
    25422449                return retval;
  • uspace/lib/c/generic/fibril_synch.c

    r831507b r1fff583  
    112112                awaiter_t wdata;
    113113
    114                 awaiter_initialize(&wdata);
    115114                wdata.fid = fibril_get_id();
     115                wdata.active = false;
    116116                wdata.wu_event.inlist = true;
     117                link_initialize(&wdata.wu_event.link);
    117118                list_append(&wdata.wu_event.link, &fm->waiters);
    118119                check_for_deadlock(&fm->oi);
     
    204205                awaiter_t wdata;
    205206
    206                 awaiter_initialize(&wdata);
    207207                wdata.fid = (fid_t) f;
     208                wdata.active = false;
    208209                wdata.wu_event.inlist = true;
     210                link_initialize(&wdata.wu_event.link);
    209211                f->flags &= ~FIBRIL_WRITER;
    210212                list_append(&wdata.wu_event.link, &frw->waiters);
     
    231233                awaiter_t wdata;
    232234
    233                 awaiter_initialize(&wdata);
    234235                wdata.fid = (fid_t) f;
     236                wdata.active = false;
    235237                wdata.wu_event.inlist = true;
     238                link_initialize(&wdata.wu_event.link);
    236239                f->flags |= FIBRIL_WRITER;
    237240                list_append(&wdata.wu_event.link, &frw->waiters);
     
    372375                return ETIMEOUT;
    373376
    374         awaiter_initialize(&wdata);
    375377        wdata.fid = fibril_get_id();
     378        wdata.active = false;
     379       
    376380        wdata.to_event.inlist = timeout > 0;
     381        wdata.to_event.occurred = false;
     382        link_initialize(&wdata.to_event.link);
     383
    377384        wdata.wu_event.inlist = true;
     385        link_initialize(&wdata.wu_event.link);
    378386
    379387        futex_down(&async_futex);
  • uspace/lib/c/generic/private/async.h

    r831507b r1fff583  
    8181} awaiter_t;
    8282
    83 extern void awaiter_initialize(awaiter_t *);
    84 
    8583extern void __async_init(void);
    8684extern void async_insert_timeout(awaiter_t *);
  • uspace/lib/c/include/async.h

    r831507b r1fff583  
    139139extern void async_wait_for(aid_t, sysarg_t *);
    140140extern int async_wait_timeout(aid_t, sysarg_t *, suseconds_t);
    141 extern void async_forget(aid_t);
    142141
    143142extern fid_t async_new_connection(task_id_t, sysarg_t, ipc_callid_t,
  • uspace/srv/fs/fat/fat_dentry.c

    r831507b r1fff583  
    334334        while (i < count) {
    335335                if ((ch = str_decode(src, &off, STR_NO_LIMIT)) != 0) {
    336                         if (ascii_check(ch) && IS_D_CHAR(ch))
     336                        if (ascii_check(ch) & IS_D_CHAR(ch))
    337337                                *dst = toupper(ch);
    338338                        else
  • uspace/srv/fs/fat/fat_directory.c

    r831507b r1fff583  
    162162        int rc;
    163163
    164         void *data;
    165         fat_instance_t *instance;
    166 
    167         rc = fs_instance_get(di->nodep->idx->service_id, &data);
    168         assert(rc == EOK);
    169         instance = (fat_instance_t *) data;
    170        
    171164        do {
    172165                rc = fat_directory_get(di, &d);
     
    184177                                long_entry_count--;
    185178                                if ((FAT_LFN_ORDER(d) == long_entry_count) &&
    186                                     (checksum == FAT_LFN_CHKSUM(d))) {
     179                                        (checksum == FAT_LFN_CHKSUM(d))) {
    187180                                        /* Right order! */
    188181                                        fat_lfn_get_entry(d, wname,
     
    196189                                        long_entry = false;
    197190                                }
    198                         } else if (FAT_IS_LFN(d) && instance->lfn_enabled) {
     191                        } else if (FAT_IS_LFN(d)) {
    199192                                /* We found Last long entry! */
    200193                                if (FAT_LFN_COUNT(d) <= FAT_LFN_MAX_COUNT) {
     
    315308                checksum = fat_dentry_chksum(de->name);
    316309
    317                 rc = fat_directory_seek(di, start_pos + long_entry_count);
     310                rc = fat_directory_seek(di, start_pos+long_entry_count);
    318311                if (rc != EOK)
    319312                        return rc;
Note: See TracChangeset for help on using the changeset viewer.