atapi.c (aa348082d8e89d2ab021caadbcc97c93038fffb2) | atapi.c (a7acf552e2cfb42ea1b27966b7f318eca2cc478a) |
---|---|
1/* 2 * QEMU ATAPI Emulation 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * Copyright (c) 2006 Openedhand Ltd. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 57 unchanged lines hidden (view full) --- 66static void lba_to_msf(uint8_t *buf, int lba) 67{ 68 lba += 150; 69 buf[0] = (lba / 75) / 60; 70 buf[1] = (lba / 75) % 60; 71 buf[2] = lba % 75; 72} 73 | 1/* 2 * QEMU ATAPI Emulation 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * Copyright (c) 2006 Openedhand Ltd. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 57 unchanged lines hidden (view full) --- 66static void lba_to_msf(uint8_t *buf, int lba) 67{ 68 lba += 150; 69 buf[0] = (lba / 75) / 60; 70 buf[1] = (lba / 75) % 60; 71 buf[2] = lba % 75; 72} 73 |
74/* XXX: DVDs that could fit on a CD will be reported as a CD */ | |
75static inline int media_present(IDEState *s) 76{ 77 return (s->nb_sectors > 0); 78} 79 | 74static inline int media_present(IDEState *s) 75{ 76 return (s->nb_sectors > 0); 77} 78 |
79/* XXX: DVDs that could fit on a CD will be reported as a CD */ |
|
80static inline int media_is_dvd(IDEState *s) 81{ 82 return (media_present(s) && s->nb_sectors > CD_MAX_SECTORS); 83} 84 85static inline int media_is_cd(IDEState *s) 86{ 87 return (media_present(s) && s->nb_sectors <= CD_MAX_SECTORS); --- 1047 unchanged lines hidden --- | 80static inline int media_is_dvd(IDEState *s) 81{ 82 return (media_present(s) && s->nb_sectors > CD_MAX_SECTORS); 83} 84 85static inline int media_is_cd(IDEState *s) 86{ 87 return (media_present(s) && s->nb_sectors <= CD_MAX_SECTORS); --- 1047 unchanged lines hidden --- |