[PATCH 1/9] network/dhcp: PR1841: Fix DNS processing in DHCP

2018-01-11 Thread Gedare Bloom
From: Sebastien Bourdeauducq 

---
 cpukit/libnetworking/rtems/rtems_dhcp.c | 48 ++---
 1 file changed, 45 insertions(+), 3 deletions(-)

diff --git a/cpukit/libnetworking/rtems/rtems_dhcp.c 
b/cpukit/libnetworking/rtems/rtems_dhcp.c
index 82f8fd9..f71d83e 100644
--- a/cpukit/libnetworking/rtems/rtems_dhcp.c
+++ b/cpukit/libnetworking/rtems/rtems_dhcp.c
@@ -205,6 +205,35 @@ static const char dhcp_request_parameters[5] = { 
DHCP_SUBNET,
  DHCP_DNS,
  DHCP_HOST,
  DHCP_DOMAIN_NAME };
+#define NUM_NAMESERVERS \
+  (sizeof rtems_bsdnet_config.name_server / sizeof 
rtems_bsdnet_config.name_server[0])
+static struct in_addr rtems_dhcpd_nameserver[NUM_NAMESERVERS];
+static int rtems_dhcpd_nameserver_count = 0;
+
+/*
+ * Clean any DNS entries add by a DHCP request.
+ */
+static void
+clean_dns_entries (void)
+{
+  int e;
+  for (e = 0; e < rtems_dhcpd_nameserver_count; ++e)
+  {
+int n;
+for (n = 0; n < rtems_bsdnet_nameserver_count; ++ n)
+{
+  if (memcmp (&rtems_dhcpd_nameserver[e], &rtems_bsdnet_nameserver[n], 4) 
== 0)
+  {
+if (n < (NUM_NAMESERVERS - 1))
+  memmove (&rtems_bsdnet_nameserver[n],
+   &rtems_bsdnet_nameserver[n + 1],
+   (NUM_NAMESERVERS - n - 1) * 4);
+--rtems_bsdnet_nameserver_count;
+  }
+}
+  }
+  rtems_dhcpd_nameserver_count = 0;
+}
 
 /*
  * Format an IP address in dotted decimal.
@@ -363,10 +392,12 @@ process_options (unsigned char *optbuf, int optbufSize)
 {
   int dlen = 0;
   while ((dlen < len) &&
- (rtems_bsdnet_nameserver_count <
-  sizeof rtems_bsdnet_config.name_server /
-  sizeof rtems_bsdnet_config.name_server[0]))
+ (rtems_dhcpd_nameserver_count < NUM_NAMESERVERS) &&
+ (rtems_bsdnet_nameserver_count < NUM_NAMESERVERS))
   {
+memcpy (&rtems_dhcpd_nameserver
+[rtems_dhcpd_nameserver_count], p + dlen, 4);
+rtems_dhcpd_nameserver_count++;
 memcpy (&rtems_bsdnet_nameserver
 [rtems_bsdnet_nameserver_count], p + dlen, 4);
 rtems_bsdnet_nameserver_count++;
@@ -745,6 +776,15 @@ dhcp_task (rtems_task_argument _sdl)
 continue;
   }
 
+  /*
+   * We have an ack. Clear the DNS entries that have been assigned by a 
previous
+   * DHCP request.
+   */
+  clean_dns_entries ();
+
+  /*
+   * Process this requests options.
+   */
   process_options (&dhcp_req.vend[4], sizeof (dhcp_req.vend) - 4);
 
   if (dhcp_message_type != DHCP_ACK)
@@ -860,6 +900,8 @@ dhcp_init (int update_files)
   struct sockaddr_dl   *sdl = NULL;
   struct proc  *procp = NULL;
 
+  clean_dns_entries();
+  
   /*
* If we are to update the files create the root
* file structure.
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 2/9] dosfs: Fix for no space left on device condition

2018-01-11 Thread Gedare Bloom
From: Sebastian Huber 

The file size was wrong in the no space left on device condition.  This
resulted in turn in a read of an invalid block which lead to an EIO
error status.
---
 cpukit/libfs/src/dosfs/fat_file.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/cpukit/libfs/src/dosfs/fat_file.c 
b/cpukit/libfs/src/dosfs/fat_file.c
index 0cd5f28..8452ee8 100644
--- a/cpukit/libfs/src/dosfs/fat_file.c
+++ b/cpukit/libfs/src/dosfs/fat_file.c
@@ -532,9 +532,10 @@ fat_file_extend(
 
 /*  check wether we satisfied request for 'cls2add' clusters */
 if (cls2add != cls_added)
-*a_length = new_length -
-((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) -
-(bytes2add & (fs_info->vol.bpc - 1));
+{
+new_length -= bytes2add & (fs_info->vol.bpc - 1);
+new_length -= (cls2add - cls_added) << fs_info->vol.bpc_log2;
+}
 
 /* add new chain to the end of existed */
 if ( fat_fd->fat_file_size == 0 )
@@ -583,6 +584,7 @@ fat_file_extend(
 }
 }
 
+*a_length = new_length;
 fat_fd->fat_file_size = new_length;
 
 return RC_OK;
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 5/9] rtems: PR1844: Fix MP process packet size

2018-01-11 Thread Gedare Bloom
From: Sebastian Huber 

---
 cpukit/rtems/src/msgmp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
index 9f033a8..481bc3a 100644
--- a/cpukit/rtems/src/msgmp.c
+++ b/cpukit/rtems/src/msgmp.c
@@ -51,8 +51,8 @@ void _Message_queue_MP_Send_process_packet (
 
   the_packet= _Message_queue_MP_Get_packet();
   the_packet->Prefix.the_class  = MP_PACKET_MESSAGE_QUEUE;
-  the_packet->Prefix.length = sizeof ( Message_queue_MP_Packet );
-  the_packet->Prefix.to_convert = sizeof ( Message_queue_MP_Packet );
+  the_packet->Prefix.length = MESSAGE_QUEUE_MP_PACKET_SIZE;
+  the_packet->Prefix.to_convert = MESSAGE_QUEUE_MP_PACKET_SIZE;
   the_packet->operation = operation;
   the_packet->Prefix.id = message_queue_id;
   the_packet->name  = name;
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 4/9] librpc: PR2066: Fix for short enums

2018-01-11 Thread Gedare Bloom
From: Sebastian Huber 

The XDR library has a problem on architectures with short enums like the
default ARM EABI.  Short enums means that the size of the enum type is
variable and the smallest integer type to hold all enum values will be
selected.  For many enums this is char.  The XDR library uses int32_t
for enum_t.  There are several evil casts from an enum type to enum_t
which leads to invalid memory accesses on short enum architectures.  A
workaround is to add appropriate dummy enum values.
---
 cpukit/librpc/include/rpc/auth.h   |  3 ++-
 cpukit/librpc/include/rpc/clnt_stat.h  |  3 ++-
 cpukit/librpc/include/rpc/rpc_msg.h| 12 
 cpukit/librpc/include/rpc/svc.h|  3 ++-
 cpukit/librpc/include/rpcsvc/nis_db.h  |  6 --
 cpukit/librpc/include/rpcsvc/yp_prot.h |  3 ++-
 cpukit/librpc/src/xdr/xdr.c|  8 +++-
 7 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/cpukit/librpc/include/rpc/auth.h b/cpukit/librpc/include/rpc/auth.h
index f644532..8f5273b 100644
--- a/cpukit/librpc/include/rpc/auth.h
+++ b/cpukit/librpc/include/rpc/auth.h
@@ -66,7 +66,8 @@ enum auth_stat {
 * failed locally
*/
AUTH_INVALIDRESP=6, /* bogus response verifier */
-   AUTH_FAILED=7   /* some unknown reason */
+   AUTH_FAILED=7,  /* some unknown reason */
+   _AUTH_STAT = 0x
 };
 
 union des_block {
diff --git a/cpukit/librpc/include/rpc/clnt_stat.h 
b/cpukit/librpc/include/rpc/clnt_stat.h
index 397bdbc..2c68745 100644
--- a/cpukit/librpc/include/rpc/clnt_stat.h
+++ b/cpukit/librpc/include/rpc/clnt_stat.h
@@ -73,7 +73,8 @@ enum clnt_stat {
RPC_STALERACHANDLE = 25,
RPC_CANTCONNECT = 26,   /* couldn't make connection (cots) */
RPC_XPRTFAILED = 27,/* received discon from remote (cots) */
-   RPC_CANTCREATESTREAM = 28   /* can't push rpc module (cots) */
+   RPC_CANTCREATESTREAM = 28,  /* can't push rpc module (cots) */
+   _CLNT_STAT = 0x
 };
 
 #ifdef __cplusplus
diff --git a/cpukit/librpc/include/rpc/rpc_msg.h 
b/cpukit/librpc/include/rpc/rpc_msg.h
index 21fcb84..c2f3304 100644
--- a/cpukit/librpc/include/rpc/rpc_msg.h
+++ b/cpukit/librpc/include/rpc/rpc_msg.h
@@ -56,12 +56,14 @@
 
 enum msg_type {
CALL=0,
-   REPLY=1
+   REPLY=1,
+   _MSG_TYPE = 0x
 };
 
 enum reply_stat {
MSG_ACCEPTED=0,
-   MSG_DENIED=1
+   MSG_DENIED=1,
+   _REPLY_STAT = 0x
 };
 
 enum accept_stat {
@@ -70,12 +72,14 @@ enum accept_stat {
PROG_MISMATCH=2,
PROC_UNAVAIL=3,
GARBAGE_ARGS=4,
-   SYSTEM_ERR=5
+   SYSTEM_ERR=5,
+   _ACCEPT_STAT = 0x
 };
 
 enum reject_stat {
RPC_MISMATCH=0,
-   AUTH_ERROR=1
+   AUTH_ERROR=1,
+   _REJECT_STAT = 0x
 };
 
 /*
diff --git a/cpukit/librpc/include/rpc/svc.h b/cpukit/librpc/include/rpc/svc.h
index f7c6ebd..30fc4f7 100644
--- a/cpukit/librpc/include/rpc/svc.h
+++ b/cpukit/librpc/include/rpc/svc.h
@@ -66,7 +66,8 @@
 enum xprt_stat {
XPRT_DIED,
XPRT_MOREREQS,
-   XPRT_IDLE
+   XPRT_IDLE,
+   _XPRT_STAT = 0x
 };
 
 struct rpc_msg;
diff --git a/cpukit/librpc/include/rpcsvc/nis_db.h 
b/cpukit/librpc/include/rpcsvc/nis_db.h
index dbdee5a..71785b0 100644
--- a/cpukit/librpc/include/rpcsvc/nis_db.h
+++ b/cpukit/librpc/include/rpcsvc/nis_db.h
@@ -69,7 +69,8 @@ enum db_status {
DB_BADOBJECT = 5,
DB_MEMORY_LIMIT = 6,
DB_STORAGE_LIMIT = 7,
-   DB_INTERNAL_ERROR = 8
+   DB_INTERNAL_ERROR = 8,
+   _DB_STATUS = 0x
 };
 typedef enum db_status db_status;
 
@@ -80,7 +81,8 @@ enum db_action {
DB_FIRST = 3,
DB_NEXT = 4,
DB_ALL = 5,
-   DB_RESET_NEXT = 6
+   DB_RESET_NEXT = 6,
+   _DB_ACTION = 0x
 };
 typedef enum db_action db_action;
 
diff --git a/cpukit/librpc/include/rpcsvc/yp_prot.h 
b/cpukit/librpc/include/rpcsvc/yp_prot.h
index 5abe0e2..f29f3ce 100644
--- a/cpukit/librpc/include/rpcsvc/yp_prot.h
+++ b/cpukit/librpc/include/rpcsvc/yp_prot.h
@@ -233,7 +233,8 @@ struct dom_binding {
 /* error code in ypbind_resp.ypbind_status */
 enum ypbind_resptype {
YPBIND_SUCC_VAL = 1,
-   YPBIND_FAIL_VAL = 2
+   YPBIND_FAIL_VAL = 2,
+   _YPBIND_RESPTYPE = 0x
 };
 
 /* network order, of course */
diff --git a/cpukit/librpc/src/xdr/xdr.c b/cpukit/librpc/src/xdr/xdr.c
index 02631e6..80c29bb 100644
--- a/cpukit/librpc/src/xdr/xdr.c
+++ b/cpukit/librpc/src/xdr/xdr.c
@@ -458,16 +458,14 @@ xdr_enum(
enum_t *ep)
 {
 #ifndef lint
-   enum sizecheck { SIZEVAL }; /* used to find the size of an enum */
-
/*
 * enums are treated as ints
 */
-   if (sizeof (enum sizecheck) == sizeof (long)) {
+   if (sizeof (enum_t) == sizeof (long)) {
return (xdr_long(xdrs, (long *)ep));
-   } else if (sizeof (enum sizecheck) == size

[PATCH 0/9] 4.10 Maintenance

2018-01-11 Thread Gedare Bloom
I went through commits between the 4.10/4.11 split and
January 2013, and selected the following as suitable
to apply for 4.10 maintenance. Not all of these had
open PRs/tickets, and I did not reformat any patches
but simply cherry-picked and corrected any conflicts.

Ralf Kirchner (1):
  dosfs: Fix msdos_format()

Sebastian Huber (6):
  dosfs: Fix for no space left on device condition
  librpc: PR2066: Fix for short enums
  rtems: PR1844: Fix MP process packet size
  score: Use _Workspace_Allocate_or_fatal_error()
  libnetworking: Disconnect after mbuf shortage
  bsps: Fix rtems_interrupt_server_handler_remove()

Sebastien Bourdeauducq (2):
  network/dhcp: PR1841: Fix DNS processing in DHCP
  network/bootp: PR2031: Add and use header file

 c/src/lib/libbsp/shared/src/irq-server.c   |  4 +-
 cpukit/libfs/src/dosfs/fat_file.c  |  8 ++-
 cpukit/libfs/src/dosfs/msdos_format.c  |  2 +-
 cpukit/libnetworking/Makefile.am   |  1 +
 cpukit/libnetworking/netinet/udp_usrreq.c  |  5 +-
 cpukit/libnetworking/nfs/bootp_subr.c  | 16 +
 cpukit/libnetworking/rtems/bootp.h | 41 
 cpukit/libnetworking/rtems/rtems_bootp.c   |  2 +
 cpukit/libnetworking/rtems/rtems_bsdnet_internal.h |  1 -
 cpukit/libnetworking/rtems/rtems_dhcp.c| 74 ++
 cpukit/librpc/include/rpc/auth.h   |  3 +-
 cpukit/librpc/include/rpc/clnt_stat.h  |  3 +-
 cpukit/librpc/include/rpc/rpc_msg.h| 12 ++--
 cpukit/librpc/include/rpc/svc.h|  3 +-
 cpukit/librpc/include/rpcsvc/nis_db.h  |  6 +-
 cpukit/librpc/include/rpcsvc/yp_prot.h |  3 +-
 cpukit/librpc/src/xdr/xdr.c|  8 +--
 cpukit/rtems/src/msgmp.c   |  4 +-
 cpukit/score/src/objectextendinformation.c | 13 ++--
 19 files changed, 140 insertions(+), 69 deletions(-)
 create mode 100644 cpukit/libnetworking/rtems/bootp.h

-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 6/9] score: Use _Workspace_Allocate_or_fatal_error()

2018-01-11 Thread Gedare Bloom
From: Sebastian Huber 

Use _Workspace_Allocate_or_fatal_error() consistently in case auto
extend is turned off.  This helps to avoid undefined behaviour in
_API_Mutex_Allocate() in case _API_Mutex_Information() fails.
---
 cpukit/score/src/objectextendinformation.c | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/cpukit/score/src/objectextendinformation.c 
b/cpukit/score/src/objectextendinformation.c
index c56a831..d94d5cd 100644
--- a/cpukit/score/src/objectextendinformation.c
+++ b/cpukit/score/src/objectextendinformation.c
@@ -142,11 +142,14 @@ void _Objects_Extend_information(
 block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
   ((maximum + minimum_index) * sizeof(Objects_Control *));
-object_blocks = (void**) _Workspace_Allocate( block_size );
-
-if ( !object_blocks ) {
-  _Workspace_Free( new_object_block );
-  return;
+if ( information->auto_extend ) {
+  object_blocks = _Workspace_Allocate( block_size );
+  if ( !object_blocks ) {
+_Workspace_Free( new_object_block );
+return;
+  }
+} else {
+  object_blocks = _Workspace_Allocate_or_fatal_error( block_size );
 }
 
 /*
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 3/9] network/bootp: PR2031: Add and use header file

2018-01-11 Thread Gedare Bloom
From: Sebastien Bourdeauducq 

---
 cpukit/libnetworking/Makefile.am   |  1 +
 cpukit/libnetworking/nfs/bootp_subr.c  | 16 ++---
 cpukit/libnetworking/rtems/bootp.h | 41 ++
 cpukit/libnetworking/rtems/rtems_bootp.c   |  2 ++
 cpukit/libnetworking/rtems/rtems_bsdnet_internal.h |  1 -
 cpukit/libnetworking/rtems/rtems_dhcp.c| 26 +++---
 6 files changed, 50 insertions(+), 37 deletions(-)
 create mode 100644 cpukit/libnetworking/rtems/bootp.h

diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index 54f144f..7f2481c 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -8,6 +8,7 @@ include $(top_srcdir)/automake/compile.am
 AM_CPPFLAGS += -I$(srcdir)
 
 EXTRA_DIST = README
+EXTRA_DIST += rtems/bootp.h
 
 # poll is not supported
 UNUSED_FILES = poll.h
diff --git a/cpukit/libnetworking/nfs/bootp_subr.c 
b/cpukit/libnetworking/nfs/bootp_subr.c
index e976227..5375b66 100644
--- a/cpukit/libnetworking/nfs/bootp_subr.c
+++ b/cpukit/libnetworking/nfs/bootp_subr.c
@@ -74,6 +74,8 @@
 #include 
 #include 
 
+#include "rtems/bootp.h"
+
 #define BOOTP_MIN_LEN  300 /* Minimum size of bootp udp packet */
 
 /*
@@ -138,20 +140,6 @@ void bootpboot_p_rtlist(void);
 void bootpboot_p_iflist(void);
 #endif
 
-int  bootpc_call(struct bootp_packet *call,
-struct bootp_packet *reply,
-struct proc *procp);
-
-int bootpc_fakeup_interface(struct ifreq *ireq,struct socket *so,
-   struct proc *procp);
-
-int 
-bootpc_adjust_interface(struct ifreq *ireq,struct socket *so,
-   struct sockaddr_in *myaddr,
-   struct sockaddr_in *netmask,
-   struct sockaddr_in *gw,
-   struct proc *procp);
-
 #ifdef BOOTP_DEBUG
 void
 bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma)
diff --git a/cpukit/libnetworking/rtems/bootp.h 
b/cpukit/libnetworking/rtems/bootp.h
new file mode 100644
index 000..d8eeb76
--- /dev/null
+++ b/cpukit/libnetworking/rtems/bootp.h
@@ -0,0 +1,41 @@
+/* Subroutines from cpukit/libnetworking/nfs/bootp_subr.c */
+
+#if !defined (__RTEMS_BOOTP_H__)
+#define __RTEMS_BOOTP_H__
+
+#include 
+
+#if __cplusplus
+extern "C"
+{
+#endif
+
+struct bootp_packet;
+struct proc;
+struct ifreq;
+struct socket;
+struct sockaddr_in;
+
+bool bootpc_init(bool, bool);
+
+int bootpc_call(
+ struct bootp_packet *call,
+ struct bootp_packet *reply,
+ struct proc *procp);
+int bootpc_fakeup_interface(struct ifreq *ireq,
+struct socket *so,
+struct proc *procp);
+int bootpc_adjust_interface(struct ifreq *ireq,
+struct socket *so,
+struct sockaddr_in *myaddr,
+struct sockaddr_in *netmask,
+struct sockaddr_in *gw,
+struct proc *procp);
+
+void *bootp_strdup_realloc(char *dst, const char *src);
+
+#if __cplusplus
+}
+#endif
+
+#endif
diff --git a/cpukit/libnetworking/rtems/rtems_bootp.c 
b/cpukit/libnetworking/rtems/rtems_bootp.c
index caf2faa..6a644a4 100644
--- a/cpukit/libnetworking/rtems/rtems_bootp.c
+++ b/cpukit/libnetworking/rtems/rtems_bootp.c
@@ -12,6 +12,8 @@
 #include 
 #include 
 
+#include "rtems/bootp.h"
+
 /*
  * Perform a BOOTP request
  */
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h 
b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
index a22a223..8c9ab04 100644
--- a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
+++ b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
@@ -179,7 +179,6 @@ void domaininit (void *);
 void ifinit (void *);
 void ipintr (void);
 void arpintr (void);
-bool bootpc_init(bool, bool);
 int socket (int, int, int);
 int ioctl (int, ioctl_command_t, ...);
 
diff --git a/cpukit/libnetworking/rtems/rtems_dhcp.c 
b/cpukit/libnetworking/rtems/rtems_dhcp.c
index f71d83e..d941ee8 100644
--- a/cpukit/libnetworking/rtems/rtems_dhcp.c
+++ b/cpukit/libnetworking/rtems/rtems_dhcp.c
@@ -99,6 +99,7 @@
 #include 
 
 #include "rtems/dhcp.h"
+#include "rtems/bootp.h"
 
 #ifndef EALEN
 #define EALEN 6
@@ -167,25 +168,6 @@ struct dhcp_packet
 };
 
 /*
- * External Declarations for Functions found in
- * rtems/c/src/libnetworking/nfs/
- */
-extern int bootpc_call (struct dhcp_packet *call,
-struct dhcp_packet *reply,
-struct proc *procp);
-extern int bootpc_fakeup_interface (struct ifreq *ireq,
-struct socket *so,
-struct proc *procp);
-extern int bootpc_adjust_interface (struct ifreq *ireq,
-struct socket *so,
-struct sockaddr_in *myaddr,
- 

[PATCH 7/9] libnetworking: Disconnect after mbuf shortage

2018-01-11 Thread Gedare Bloom
From: Sebastian Huber 

The missing disconnect left the socket in an unusable state.  Each send
request resulted in an EISCONN error.
---
 cpukit/libnetworking/netinet/udp_usrreq.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cpukit/libnetworking/netinet/udp_usrreq.c 
b/cpukit/libnetworking/netinet/udp_usrreq.c
index f09531d..ddd3f3c 100644
--- a/cpukit/libnetworking/netinet/udp_usrreq.c
+++ b/cpukit/libnetworking/netinet/udp_usrreq.c
@@ -399,8 +399,11 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct mbuf 
*addr,
M_PREPEND(m, sizeof(struct udpiphdr), M_DONTWAIT);
if (m == 0) {
error = ENOBUFS;
-   if (addr)
+   if (addr) {
+   in_pcbdisconnect(inp);
+   inp->inp_laddr = laddr;
splx(s);
+   }
goto release;
}
 
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 9/9] bsps: Fix rtems_interrupt_server_handler_remove()

2018-01-11 Thread Gedare Bloom
From: Sebastian Huber 

---
 c/src/lib/libbsp/shared/src/irq-server.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/shared/src/irq-server.c 
b/c/src/lib/libbsp/shared/src/irq-server.c
index 0026f0f..a6cdf4c 100644
--- a/c/src/lib/libbsp/shared/src/irq-server.c
+++ b/c/src/lib/libbsp/shared/src/irq-server.c
@@ -220,8 +220,8 @@ rtems_status_code rtems_interrupt_server_handler_remove(
 
   sc = rtems_interrupt_handler_remove(
 vector,
-ie.entry->handler,
-ie.entry->arg
+bsp_interrupt_server_trigger,
+ie.entry
   );
   if (sc != RTEMS_SUCCESSFUL) {
 return sc;
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 8/9] dosfs: Fix msdos_format()

2018-01-11 Thread Gedare Bloom
From: Ralf Kirchner 

For FAT32 msdos_format() used to initialize first FAT entries to
non-zero values only if a volume label was given.  Absence of these
entries made mounting such a FAT32 volume fail.
---
 cpukit/libfs/src/dosfs/msdos_format.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libfs/src/dosfs/msdos_format.c 
b/cpukit/libfs/src/dosfs/msdos_format.c
index 890fdd2..4e74662 100644
--- a/cpukit/libfs/src/dosfs/msdos_format.c
+++ b/cpukit/libfs/src/dosfs/msdos_format.c
@@ -1063,7 +1063,7 @@ int msdos_format
* write FAT entry 1 as EOC
* allocate directory in a FAT32 FS
*/
-  if ((ret_val == 0) && fmt_params.VolLabel_present){
+  if (ret_val == 0) {
 /*
  * empty sector: all clusters are free/do not link further on
  */
-- 
2.7.4

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 0/9] 4.10 Maintenance

2018-01-11 Thread Joel Sherrill
These are all obviously known issues which were worthy of being included
on the 4.11 branch and/or master which applied to 4.10.

Since this are the final approved patch, my vote is to apply them. The only
discussion should be if the bug exists in 4.10.

--joel

On Thu, Jan 11, 2018 at 12:13 PM, Gedare Bloom  wrote:

> I went through commits between the 4.10/4.11 split and
> January 2013, and selected the following as suitable
> to apply for 4.10 maintenance. Not all of these had
> open PRs/tickets, and I did not reformat any patches
> but simply cherry-picked and corrected any conflicts.
>
> Ralf Kirchner (1):
>   dosfs: Fix msdos_format()
>
> Sebastian Huber (6):
>   dosfs: Fix for no space left on device condition
>   librpc: PR2066: Fix for short enums
>   rtems: PR1844: Fix MP process packet size
>   score: Use _Workspace_Allocate_or_fatal_error()
>   libnetworking: Disconnect after mbuf shortage
>   bsps: Fix rtems_interrupt_server_handler_remove()
>
> Sebastien Bourdeauducq (2):
>   network/dhcp: PR1841: Fix DNS processing in DHCP
>   network/bootp: PR2031: Add and use header file
>
>  c/src/lib/libbsp/shared/src/irq-server.c   |  4 +-
>  cpukit/libfs/src/dosfs/fat_file.c  |  8 ++-
>  cpukit/libfs/src/dosfs/msdos_format.c  |  2 +-
>  cpukit/libnetworking/Makefile.am   |  1 +
>  cpukit/libnetworking/netinet/udp_usrreq.c  |  5 +-
>  cpukit/libnetworking/nfs/bootp_subr.c  | 16 +
>  cpukit/libnetworking/rtems/bootp.h | 41 
>  cpukit/libnetworking/rtems/rtems_bootp.c   |  2 +
>  cpukit/libnetworking/rtems/rtems_bsdnet_internal.h |  1 -
>  cpukit/libnetworking/rtems/rtems_dhcp.c| 74
> ++
>  cpukit/librpc/include/rpc/auth.h   |  3 +-
>  cpukit/librpc/include/rpc/clnt_stat.h  |  3 +-
>  cpukit/librpc/include/rpc/rpc_msg.h| 12 ++--
>  cpukit/librpc/include/rpc/svc.h|  3 +-
>  cpukit/librpc/include/rpcsvc/nis_db.h  |  6 +-
>  cpukit/librpc/include/rpcsvc/yp_prot.h |  3 +-
>  cpukit/librpc/src/xdr/xdr.c|  8 +--
>  cpukit/rtems/src/msgmp.c   |  4 +-
>  cpukit/score/src/objectextendinformation.c | 13 ++--
>  19 files changed, 140 insertions(+), 69 deletions(-)
>  create mode 100644 cpukit/libnetworking/rtems/bootp.h
>
> --
> 2.7.4
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel