src/platform/qemu/driver/vdisk.c
// find a free descriptor, mark it non-free, return its index.
find a free descriptor, mark it non-free, return its index.
find a free descriptor mark it non - free return its index .
static int
alloc_desc() {
    for (int i = 0; i < DISK_DESC_NUM; i++) {
        if (disk.free[i]) {
            disk.free[i] = 0;
            return i;
        }
    }
    return -1;
}
static int alloc_desc ( ) { for ( int i = 0 ; i < DISK_DESC_NUM ; i ++ ) { if ( disk . free [ i ] ) { disk . free [ i ] = 0 ; return i ; } } return -1 ; }
find a free descriptor, mark it non-free, return its index.
find a free descriptor mark it non - free return its index .