fdc.c (8fa0b743820f61c661ba5f3ea0e3be0dc137910e) fdc.c (02c62349c93f29b881498630c7a0623540255764)
1/*-
2 * Copyright (c) 2004 Poul-Henning Kamp
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Don Ahn.
8 *

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

860 mtx_lock(&fdc->fdc_mtx);
861 fd->flags |= FD_EMPTY;
862 fd->flags |= FD_NEWDISK;
863 mtx_unlock(&fdc->fdc_mtx);
864 g_topology_lock();
865 g_orphan_provider(fd->fd_provider, ENXIO);
866 fd->fd_provider->flags |= G_PF_WITHER;
867 fd->fd_provider =
1/*-
2 * Copyright (c) 2004 Poul-Henning Kamp
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Don Ahn.
8 *

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

860 mtx_lock(&fdc->fdc_mtx);
861 fd->flags |= FD_EMPTY;
862 fd->flags |= FD_NEWDISK;
863 mtx_unlock(&fdc->fdc_mtx);
864 g_topology_lock();
865 g_orphan_provider(fd->fd_provider, ENXIO);
866 fd->fd_provider->flags |= G_PF_WITHER;
867 fd->fd_provider =
868 g_new_providerf(fd->fd_geom, fd->fd_geom->name);
868 g_new_providerf(fd->fd_geom, "%s", fd->fd_geom->name);
869 g_error_provider(fd->fd_provider, 0);
870 g_topology_unlock();
871 return (fdc_biodone(fdc, ENXIO));
872 }
873
874 /* Check if the floppy is write-protected */
875 if(bp->bio_cmd & (BIO_FMT | BIO_WRITE)) {
876 retry_line = __LINE__;

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

2006fd_attach2(void *arg, int flag)
2007{
2008 struct fd_data *fd;
2009
2010 fd = arg;
2011
2012 fd->fd_geom = g_new_geomf(&g_fd_class,
2013 "fd%d", device_get_unit(fd->dev));
869 g_error_provider(fd->fd_provider, 0);
870 g_topology_unlock();
871 return (fdc_biodone(fdc, ENXIO));
872 }
873
874 /* Check if the floppy is write-protected */
875 if(bp->bio_cmd & (BIO_FMT | BIO_WRITE)) {
876 retry_line = __LINE__;

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

2006fd_attach2(void *arg, int flag)
2007{
2008 struct fd_data *fd;
2009
2010 fd = arg;
2011
2012 fd->fd_geom = g_new_geomf(&g_fd_class,
2013 "fd%d", device_get_unit(fd->dev));
2014 fd->fd_provider = g_new_providerf(fd->fd_geom, fd->fd_geom->name);
2014 fd->fd_provider = g_new_providerf(fd->fd_geom, "%s", fd->fd_geom->name);
2015 fd->fd_geom->softc = fd;
2016 g_error_provider(fd->fd_provider, 0);
2017}
2018
2019static int
2020fd_attach(device_t dev)
2021{
2022 struct fd_data *fd;

--- 57 unchanged lines hidden ---
2015 fd->fd_geom->softc = fd;
2016 g_error_provider(fd->fd_provider, 0);
2017}
2018
2019static int
2020fd_attach(device_t dev)
2021{
2022 struct fd_data *fd;

--- 57 unchanged lines hidden ---