Change in osmo-ccid-firmware[master]: migrate from BSC_FD_* to OSMO_FD_*

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Oct 18 20:34:14 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/20739 )


Change subject: migrate from BSC_FD_* to OSMO_FD_*
......................................................................

migrate from BSC_FD_* to OSMO_FD_*

Change-Id: I9d341d24527ca739424a68059126a7f789206c42
---
M ccid_host/ccid_main_functionfs.c
M ccid_host/cuart_driver_tty.c
M ccid_host/hub_main_functionfs.c
3 files changed, 13 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/39/20739/1

diff --git a/ccid_host/ccid_main_functionfs.c b/ccid_host/ccid_main_functionfs.c
index b538e12..dd1e274 100644
--- a/ccid_host/ccid_main_functionfs.c
+++ b/ccid_host/ccid_main_functionfs.c
@@ -214,7 +214,7 @@
 	int rc;
 
 	LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__);
-	if (what & BSC_FD_READ) {
+	if (what & OSMO_FD_READ) {
 		rc = read(ofd->fd, msgb_data(msg), msgb_tailroom(msg));
 		if (rc <= 0) {
 			msgb_free(msg);
@@ -229,7 +229,7 @@
 static int ep_in_cb(struct osmo_fd *ofd, unsigned int what)
 {
 	LOGP(DUSB, LOGL_DEBUG, "%s\n", __func__);
-	if (what & BSC_FD_WRITE) {
+	if (what & OSMO_FD_WRITE) {
 		/* write what we have to write */
 	}
 	return 0;
@@ -287,7 +287,7 @@
 	struct ufunc_handle *uh = (struct ufunc_handle *) ofd->data;
 	int rc;
 
-	if (what & BSC_FD_READ) {
+	if (what & OSMO_FD_READ) {
 		struct usb_functionfs_event evt;
 		rc = read(ofd->fd, (uint8_t *)&evt, sizeof(evt));
 		if (rc < sizeof(evt))
@@ -427,7 +427,7 @@
 	/* open control endpoint and write descriptors to it */
 	rc = open("ep0", O_RDWR);
 	assert(rc >= 0);
-	osmo_fd_setup(&uh->ep0, rc, BSC_FD_READ, &ep_0_cb, uh, 0);
+	osmo_fd_setup(&uh->ep0, rc, OSMO_FD_READ, &ep_0_cb, uh, 0);
 	osmo_fd_register(&uh->ep0);
 	rc = write(uh->ep0.fd, &descriptors, sizeof(descriptors));
 	if (rc != sizeof(descriptors)) {
@@ -451,7 +451,7 @@
 
 	rc = open("ep2", O_RDWR);
 	assert(rc >= 0);
-	osmo_fd_setup(&uh->ep_out, rc, BSC_FD_READ, &ep_out_cb, uh, 2);
+	osmo_fd_setup(&uh->ep_out, rc, OSMO_FD_READ, &ep_out_cb, uh, 2);
 #ifdef FUNCTIONFS_SUPPORTS_POLL
 	osmo_fd_register(&uh->ep_out);
 #endif
@@ -477,7 +477,7 @@
 	/* create an eventfd, which will be marked readable once some AIO completes */
 	rc = eventfd(0, 0);
 	OSMO_ASSERT(rc >= 0);
-	osmo_fd_setup(&uh->aio_evfd, rc, BSC_FD_READ, &evfd_cb, uh, 0);
+	osmo_fd_setup(&uh->aio_evfd, rc, OSMO_FD_READ, &evfd_cb, uh, 0);
 	osmo_fd_register(&uh->aio_evfd);
 
 	uh->aio_out.iocb = malloc(sizeof(struct iocb));
@@ -499,7 +499,7 @@
 #ifndef FUNCTIONFS_SUPPORTS_POLL
 	dequeue_aio_write_in(uh);
 #else
-	uh->ep_in.when |= BSC_FD_WRITE;
+	uh->ep_in.when |= OSMO_FD_WRITE;
 #endif
 	return 0;
 }
@@ -515,7 +515,7 @@
 #ifndef FUNCTIONFS_SUPPORTS_POLL
 	dequeue_aio_write_int(uh);
 #else
-	uh->ep_int.when |= BSC_FD_WRITE;
+	uh->ep_int.when |= OSMO_FD_WRITE;
 #endif
 	return 0;
 }
diff --git a/ccid_host/cuart_driver_tty.c b/ccid_host/cuart_driver_tty.c
index 38a6504..f8a1438 100644
--- a/ccid_host/cuart_driver_tty.c
+++ b/ccid_host/cuart_driver_tty.c
@@ -184,7 +184,7 @@
 
 		/* if no more bytes to transmit, disable OSMO_FD_WRITE */
 		if (cuart->u.tty.tx_index >= cuart->u.tty.tx_buf_len) {
-			ofd->when &= ~BSC_FD_WRITE;
+			ofd->when &= ~OSMO_FD_WRITE;
 #ifndef CREAD_ACTUALLY_WORKS
 			/* don't immediately notify user; first wait for characters to be received */
 #else
@@ -212,7 +212,7 @@
 	if (rc < 0)
 		return rc;
 
-	osmo_fd_setup(&cuart->u.tty.ofd, rc, BSC_FD_READ, tty_uart_fd_cb, cuart, 0);
+	osmo_fd_setup(&cuart->u.tty.ofd, rc, OSMO_FD_READ, tty_uart_fd_cb, cuart, 0);
         cuart->u.tty.baudrate = B9600;
 
 	rc = _init_uart(cuart->u.tty.ofd.fd);
diff --git a/ccid_host/hub_main_functionfs.c b/ccid_host/hub_main_functionfs.c
index 1776c94..93363a6 100644
--- a/ccid_host/hub_main_functionfs.c
+++ b/ccid_host/hub_main_functionfs.c
@@ -342,7 +342,7 @@
 	struct ufunc_handle *uh = (struct ufunc_handle *) ofd->data;
 	int rc;
 
-	if (what & BSC_FD_READ) {
+	if (what & OSMO_FD_READ) {
 		struct usb_functionfs_event evt;
 		rc = read(ofd->fd, (uint8_t *)&evt, sizeof(evt));
 		if (rc < sizeof(evt))
@@ -425,7 +425,7 @@
 	/* open control endpoint and write descriptors to it */
 	rc = open("ep0", O_RDWR);
 	assert(rc >= 0);
-	osmo_fd_setup(&uh->ep0, rc, BSC_FD_READ, &ep_0_cb, uh, 0);
+	osmo_fd_setup(&uh->ep0, rc, OSMO_FD_READ, &ep_0_cb, uh, 0);
 	osmo_fd_register(&uh->ep0);
 	rc = write(uh->ep0.fd, &descriptors, sizeof(descriptors));
 	if (rc != sizeof(descriptors)) {
@@ -460,7 +460,7 @@
 	/* create an eventfd, which will be marked readable once some AIO completes */
 	rc = eventfd(0, 0);
 	OSMO_ASSERT(rc >= 0);
-	osmo_fd_setup(&uh->aio_evfd, rc, BSC_FD_READ, &evfd_cb, uh, 0);
+	osmo_fd_setup(&uh->aio_evfd, rc, OSMO_FD_READ, &evfd_cb, uh, 0);
 	osmo_fd_register(&uh->aio_evfd);
 
 	uh->aio_int.iocb = malloc(sizeof(struct iocb));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/20739
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I9d341d24527ca739424a68059126a7f789206c42
Gerrit-Change-Number: 20739
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201018/b0983f69/attachment.htm>


More information about the gerrit-log mailing list