block.c (33f002714be2ed58ed05ae3870d5ea6915df4b47) block.c (985a03b0ce38275c2ea355bf29b6d6b5779dbb56)
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 772 unchanged lines hidden (view full) ---

781 return bs->removable;
782}
783
784int bdrv_is_read_only(BlockDriverState *bs)
785{
786 return bs->read_only;
787}
788
1/*
2 * QEMU System Emulator block driver
3 *
4 * Copyright (c) 2003 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 772 unchanged lines hidden (view full) ---

781 return bs->removable;
782}
783
784int bdrv_is_read_only(BlockDriverState *bs)
785{
786 return bs->read_only;
787}
788
789int bdrv_is_sg(BlockDriverState *bs)
790{
791 return bs->sg;
792}
793
789/* XXX: no longer used */
790void bdrv_set_change_cb(BlockDriverState *bs,
791 void (*change_cb)(void *opaque), void *opaque)
792{
793 bs->change_cb = change_cb;
794 bs->change_opaque = opaque;
795}
796

--- 592 unchanged lines hidden (view full) ---

1389{
1390 BlockDriver *drv = bs->drv;
1391
1392 bs->locked = locked;
1393 if (drv && drv->bdrv_set_locked) {
1394 drv->bdrv_set_locked(bs, locked);
1395 }
1396}
794/* XXX: no longer used */
795void bdrv_set_change_cb(BlockDriverState *bs,
796 void (*change_cb)(void *opaque), void *opaque)
797{
798 bs->change_cb = change_cb;
799 bs->change_opaque = opaque;
800}
801

--- 592 unchanged lines hidden (view full) ---

1394{
1395 BlockDriver *drv = bs->drv;
1396
1397 bs->locked = locked;
1398 if (drv && drv->bdrv_set_locked) {
1399 drv->bdrv_set_locked(bs, locked);
1400 }
1401}
1402
1403/* needed for generic scsi interface */
1404
1405int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
1406{
1407 BlockDriver *drv = bs->drv;
1408
1409 if (drv && drv->bdrv_ioctl)
1410 return drv->bdrv_ioctl(bs, req, buf);
1411 return -ENOTSUP;
1412}